Skip to content

Remove remaining pthread function from WASM_WORKERS build#26487

Open
sbc100 wants to merge 2 commits intoemscripten-core:mainfrom
sbc100:wasm_workers_no_pthreads
Open

Remove remaining pthread function from WASM_WORKERS build#26487
sbc100 wants to merge 2 commits intoemscripten-core:mainfrom
sbc100:wasm_workers_no_pthreads

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Mar 18, 2026

Remove remaining pthread function from WASM_WORKERS build. NFC

This includes pthread_self, which is not valid to call in Wasm
Workers.

This PR is currently stacked on top of both #26486 and #26471

@sbc100 sbc100 force-pushed the wasm_workers_no_pthreads branch from 4cb407b to 80b40f3 Compare March 18, 2026 19:57
sbc100 added a commit to sbc100/emscripten that referenced this pull request Mar 18, 2026
sbc100 added a commit to sbc100/emscripten that referenced this pull request Mar 18, 2026
sbc100 added a commit to sbc100/emscripten that referenced this pull request Mar 18, 2026
sbc100 added a commit to sbc100/emscripten that referenced this pull request Mar 18, 2026
sbc100 added a commit to sbc100/emscripten that referenced this pull request Mar 18, 2026
…n_futex_wait`. NFC

This means we only need to do this breaking up on our `wait` operations
in a single place.  It also means that other users the
`emscripten_futex_wait` API don't break pthread proxying or async
cancellation.

The moved code is only included in pthread-enabled builds so should not
effect Wasm Workers builders.

This change also paves the way for enabling musl's `__wait` to work
with `WASM_WORKERS`.
This includes `pthread_self`, which is not valid to call in Wasm
Workers.
@sbc100 sbc100 force-pushed the wasm_workers_no_pthreads branch from 80b40f3 to 1da8fe0 Compare March 18, 2026 23:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant