+41
−0
+39
−0
+38
−0
Loading
This implements the second part of #190847 Specifically, this pr adds `sem_open`, `sem_close`, and `sem_unlink` for posix semaphore on linux. https://pubs.opengroup.org/onlinepubs/9799919799/functions/sem_open.html https://pubs.opengroup.org/onlinepubs/9799919799/functions/sem_close.html https://pubs.opengroup.org/onlinepubs/9799919799/functions/sem_unlink.html Since it targets on linux implementation, two extra things are added: 1. add system call wrappers for `mmap`, `munmap`, `link`, `unlink`, and `ftruncate`. Those are necessary for the implementation of semaphore on linux. Wrappers is added based on the refactor proposal: https://libc.llvm.org/dev/syscall_wrapper_refactor.html. 2. refactor the previous semaphore implementation, put it under `linux/` since its based on linux.