1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:37:36 +00:00

Kernel+LibC: Add stubs for POSIX shared memory API.

Specifically shm_open() and shm_unlink(). This patch just adds stubs.
This commit is contained in:
Andreas Kling 2019-04-08 23:44:12 +02:00
parent 7f2eeb0b35
commit 99f3cc26c3
6 changed files with 36 additions and 0 deletions

View file

@ -28,4 +28,16 @@ int set_mmap_name(void* addr, size_t size, const char* name)
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int shm_open(const char* name, int flags, mode_t mode)
{
int rc = syscall(SC_shm_open, name, flags, mode);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
int shm_unlink(const char* name)
{
int rc = syscall(SC_unlink, name);
__RETURN_WITH_ERRNO(rc, rc, -1);
}
}

View file

@ -21,6 +21,8 @@ __BEGIN_DECLS
void* mmap(void* addr, size_t, int prot, int flags, int fd, off_t);
int munmap(void*, size_t);
int set_mmap_name(void*, size_t, const char*);
int shm_open(const char* name, int flags, mode_t);
int shm_unlink(const char* name);
__END_DECLS