wasi-libc
wasi-libc copied to clipboard
Update `_POSIX_THREAD_XX` macro definitions
This is a follow-up to https://github.com/WebAssembly/wasi-libc/pull/356
-
_POSIX_THREAD_PROCESS_SHARED
: Functions part of Thread Process-Shared Synchronization option likepthread_barrierattr_getpshared
are defined when threads is enabled, so define it. -
_POSIX_THREAD_SAFE_FUNCTIONS
: "thread-safe functions" are defined when threads is enabled. -
_POSIX_THREAD_ATTR_STACKADDR
: wasi-libc doesn't providepthread_attr_{get,set}stackaddr
for now, so we should not define it. -
_POSIX_THREAD_ATTR_STACKSIZE
: wasi-libc haspthread_attr_getstack
definition -
_POSIX_THREAD_PRIORITY_SCHEDULING
: WASI has no CPU scheduling support -
_POSIX_THREAD_CPUTIME
: Although WASI Preview 1 hasthread_cputime_id
, wasi-libc doesn't defineCLOCK_THREAD_CPUTIME_ID
.