Skip to content

Move low level lock/condvar/semaphore form libwasm_worker to libc.#26433

Merged
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:wasm_worker_locks
Mar 11, 2026
Merged

Move low level lock/condvar/semaphore form libwasm_worker to libc.#26433
sbc100 merged 1 commit intoemscripten-core:mainfrom
sbc100:wasm_worker_locks

Conversation

@sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Mar 11, 2026

I've moved the declarations of these functions to a new header (threading_primitives.h) which is then included in both wasm_workers.h and in threading.h.

Add a some basic testing that these function are available under pthreads as well as wasm workers.

This is step towards using these primitives to make implement libc++'s mutex/cond helpers needed for call_once. See #26375.

All the declaration and implementations here are unchanged: This is a pure move.

@sbc100 sbc100 changed the title Move low level lock/condvar/semaphore form libwasm_work to libc. Move low level lock/condvar/semaphore form libwasm_worker to libc. Mar 11, 2026
@sbc100 sbc100 requested review from dschuff, juj and kripken March 11, 2026 16:23
@sbc100 sbc100 force-pushed the wasm_worker_locks branch 2 times, most recently from cf5bb23 to 4ffbf0f Compare March 11, 2026 18:39
I've moved the declarations of these functions to a new header
(`threading_primitives.h`) which is then included in both
`wasm_workers.h` and in `threading.h`.

Add a some basic testing that these function are available under
pthreads as well as wasm workers.
@sbc100 sbc100 force-pushed the wasm_worker_locks branch from 4ffbf0f to 4ef711e Compare March 11, 2026 18:45
@sbc100
Copy link
Collaborator Author

sbc100 commented Mar 11, 2026

Also TIL one can confirm the moved code is unmodified using git show --color-moved (works with git diff too).

@sbc100 sbc100 enabled auto-merge (squash) March 11, 2026 22:00
@sbc100 sbc100 merged commit cc9fb50 into emscripten-core:main Mar 11, 2026
37 checks passed
@sbc100 sbc100 deleted the wasm_worker_locks branch March 11, 2026 22:18
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.

2 participants