mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 04:17:35 +00:00
Kernel+LibC: Use uintptr_t as the main type in the syscall interface
This commit is contained in:
parent
583bfa04e2
commit
65cdac1a5b
5 changed files with 25 additions and 19 deletions
|
@ -34,8 +34,8 @@ extern "C" {
|
|||
|
||||
void* serenity_mmap(void* addr, size_t size, int prot, int flags, int fd, off_t offset, size_t alignment, const char* name)
|
||||
{
|
||||
Syscall::SC_mmap_params params { (u32)addr, size, alignment, prot, flags, fd, offset, { name, name ? strlen(name) : 0 } };
|
||||
int rc = syscall(SC_mmap, ¶ms);
|
||||
Syscall::SC_mmap_params params { (uintptr_t)addr, size, alignment, prot, flags, fd, offset, { name, name ? strlen(name) : 0 } };
|
||||
ssize_t rc = syscall(SC_mmap, ¶ms);
|
||||
if (rc < 0 && -rc < EMAXERRNO) {
|
||||
errno = -rc;
|
||||
return MAP_FAILED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue