R
a05277a680
|
4 weeks ago | |
---|---|---|
.. | ||
README.md | 4 weeks ago | |
barrier.c | 4 weeks ago | |
condvar.c | 4 weeks ago | |
mutex.c | 4 weeks ago | |
rwlock.c | 4 weeks ago | |
spinlock.c | 4 weeks ago | |
stub-pthreads-emulated.c | 4 weeks ago | |
stub-pthreads-good.c | 4 weeks ago |
README.md
Single-threaded pthreads stubs
The goal of these files is to provide stub implementations of pthreads
functions for THREAD_MODEL=single
. This implementation should always
follow the strict letter of the POSIX specifications. This means that
"doing nothing", "always succeeding", etc. are not proper implementations
-- these stubs aim for higher conformance than that.
The code that is "more" aligned with the spirit of the POSIX specifications ends up compiled into libc itself. This primarily consists of synchronization primitives (which are implemented to actually track state).
The code that is "less" aligned with the spirit of the specifications
(e.g. by "rules-lawyering" and always failing) are built into a library
wasi-emulated-pthread.a
. The distinction is ultimately made by vibes and a
judgement call, not formal criteria.