mirror of https://github.com/WebAssembly/wasi-libc
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
850 B
17 lines
850 B
4 weeks ago
|
# 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.
|