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

Move emscripten_atomics_is_lock_free to atomic.h. NFC #23778

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Feb 27, 2025

This function is generally useful for either pthreads or wasm worker builds. Putting it in atomic.h and libatomic.js make sense.

Also remove the duplicate emscripten_navigator_hardware_concurrency function which duplicates the existing emscripten_num_logical_cores.

Also, change the return type of emscripten_atomics_is_lock_free to be bool, which better represents its type.

@sbc100 sbc100 requested a review from kripken February 27, 2025 01:19
This function is generally useful for either pthreads or wasm worker
builds.  Putting it in `atomic.h` and `libatomic.js` make sense.

Also remove the duplicate `emscripten_navigator_hardware_concurrency`
function which duplicates the existing `emscripten_num_logical_cores`.

Also, change the return type of `emscripten_atomics_is_lock_free` to
be `bool`, which better represents its type.
@sbc100 sbc100 enabled auto-merge (squash) February 27, 2025 01:25
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