diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-04-08 23:44:12 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-04-08 23:44:12 +0200 |
commit | 99f3cc26c3e69b0ad7f104cd20189cd6fd4c3cf1 (patch) | |
tree | 3de12393e11c46222ffaffe6be06c4c347f45c8f /LibC/mman.cpp | |
parent | 7f2eeb0b35d07469815f8221c8f5e0d300899f58 (diff) | |
download | serenity-99f3cc26c3e69b0ad7f104cd20189cd6fd4c3cf1.zip |
Kernel+LibC: Add stubs for POSIX shared memory API.
Specifically shm_open() and shm_unlink(). This patch just adds stubs.
Diffstat (limited to 'LibC/mman.cpp')
-rw-r--r-- | LibC/mman.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/LibC/mman.cpp b/LibC/mman.cpp index 8cba6f83af..174643712b 100644 --- a/LibC/mman.cpp +++ b/LibC/mman.cpp @@ -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); +} + } |