You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
kateinoigakukun
changed the title
Add option to wasi-libc to use spin-lock instead of memory.atomic.wait32
Add option to wasi-libc to use busy-wait instead of memory.atomic.wait32
Jan 19, 2025
This change enables the pthread-related tests in the libc-test suite.
The tests are enabled only for the `wasm32-wasip1-threads` target, which
is the only target that supports threads at the moment.
The following pthread tests are still disabled:
- pthread_cancel-points.c
- pthread_cancel.c
- pthread_robust.c
This is a preparative change for
swiftwasm/swift#5598
wasi-libc uses
memory.atomic.wait32
in__wasilibc_futex_wait
, which is called by several functions in wasi-libc includingmalloc
,fwrite
, and etc.However, the use of
memory.atomic.wait32
on the Web browser main thread (and also Audio Worklet) is prohibited. We need to do something Emscripten is doing in wasi-libc side.https://github.com/emscripten-core/emscripten/blob/058a9fff/system/lib/pthread/emscripten_futex_wait.c#L111-L150
The text was updated successfully, but these errors were encountered: