]> git.proxmox.com Git - wasi-libc.git/commit
threads: implement support for unnamed semaphores (#316)
authorAndrew Brown <andrew.brown@intel.com>
Mon, 22 Aug 2022 21:22:09 +0000 (14:22 -0700)
committerGitHub <noreply@github.com>
Mon, 22 Aug 2022 21:22:09 +0000 (14:22 -0700)
commit2057ce9262f76f7ef5a2002fa16da219e2176896
treef6c34012643ee0319c183d097e6371367835066d
parent33c3753caf32b7d456e7e6801d9037f1f6f24ba9
threads: implement support for unnamed semaphores (#316)

[POSIX semaphores] come in two forms: named and unnamed. Roughly, named
semaphores use files to implement locking across processes; unnamed
semaphores use a shared memory region to implement locking across
threads in the same process. Since WASI currently has no process concept
(and it is relatively unclear how to map the WASI files as shared
memory), only the unnamed semaphores are supported by this changed. This
means that `sem_open`, `sem_close`, and `sem_unlink` will not available
to programs compiled with a threads-enabled `wasi-libc`.

[POSIX semaphores]: https://man7.org/linux/man-pages/man7/sem_overview.7.html
Makefile
expected/wasm32-wasi/posix/defined-symbols.txt
expected/wasm32-wasi/posix/predefined-macros.txt
libc-top-half/musl/include/limits.h