Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to wasi-libc to use spin-lock instead of memory.atomic.wait32 #5598

Open
kateinoigakukun opened this issue Dec 2, 2024 · 0 comments

Comments

@kateinoigakukun
Copy link
Member

kateinoigakukun commented Dec 2, 2024

wasi-libc uses memory.atomic.wait32 in __wasilibc_futex_wait, which is called by several functions in wasi-libc including malloc, 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

@kateinoigakukun kateinoigakukun converted this from a draft issue Dec 2, 2024
@kateinoigakukun kateinoigakukun moved this from Backlog to Ready in Yuta's project Dec 16, 2024
@kateinoigakukun kateinoigakukun moved this from Ready to In progress in Yuta's project Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In progress
Development

No branches or pull requests

1 participant