1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

Kernel+LibC: Use uintptr_t as the main type in the syscall interface

This commit is contained in:
Andreas Kling 2020-10-12 14:49:31 +02:00
parent 583bfa04e2
commit 65cdac1a5b
5 changed files with 25 additions and 19 deletions

View file

@ -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, &params);
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, &params);
if (rc < 0 && -rc < EMAXERRNO) {
errno = -rc;
return MAP_FAILED;