Skip to content

Conversation

@shravanrn
Copy link
Collaborator

@shravanrn shravanrn commented Mar 19, 2025

I started testing the wasm2c code a bit more on FreeBSD and found issues with using C11 mutexes. Unfortunately, the C11 mutex APIs seems to be supported almost nowhere. Apple doesn't support it, FreeBSD doesn't support it (hence wasm2c examples actually fail on FreeBSD until this change), Windows doesn't support it till very recently. We are better off simply relying on platform specific primitives: CRITICAL_SECTION on windows, pthread_mutex_t everywhere else.

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sad to learn about the state of C11 threads.

@shravanrn shravanrn merged commit a27b480 into WebAssembly:main Mar 19, 2025
18 checks passed
@shravanrn shravanrn deleted the tls-mtx-fix branch March 19, 2025 21:05
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