Skip to content
New issue

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

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

Already on GitHub? # to your account

threads: enable PTHREAD_{MUTEX,RWLOCK,COND}_INITIALIZER #397

Merged

Conversation

whitequark
Copy link
Contributor

It looks like defined(_REENTRANT) was added here and it was just to mark these as modifiied. (@sunfishcode would know for sure.)

With this change I can build libcxxabi, libcxx, and boost with threads enabled, and link a few binaries (that do not spawn threads, but use mutexes).

@whitequark whitequark marked this pull request as draft February 23, 2023 06:59
@whitequark whitequark marked this pull request as ready for review February 23, 2023 07:18
Copy link
Collaborator

@abrown abrown left a comment

Choose a reason for hiding this comment

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

I think the idea made sense to me but initially it was a bit unclear why the comparison test for expected/wasm32-wasi/predefined-macros.txt was not failing: if we unconditionally #define these PTHREAD_*_INITIALIZERs then I was expecting a diff error. But no: pthread.h is already omitted entirely when THREAD_MODEL=single in the top-level Makefile so these will only be defined when THREAD_MODEL=posix. And they will always be defined then, which I think is what we want. LGTM!

Copy link
Member

@sunfishcode sunfishcode left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@sunfishcode sunfishcode merged commit a29c349 into WebAssembly:main Feb 24, 2023
john-sharratt pushed a commit to john-sharratt/wasix-libc that referenced this pull request Mar 6, 2023
abrown added a commit to abrown/wasi-sdk that referenced this pull request Mar 20, 2023
This change brings in several helpful PRs (e.g.,
WebAssembly/wasi-libc#397, WebAssembly/wasi-libc#399,
WebAssembly/wasi-libc#401) in anticipation of creating a release based
on LLVM 16.
abrown added a commit to WebAssembly/wasi-sdk that referenced this pull request Mar 22, 2023
This change brings in several helpful PRs (e.g.,
WebAssembly/wasi-libc#397, WebAssembly/wasi-libc#399,
WebAssembly/wasi-libc#401) in anticipation of creating a release based
on LLVM 16.
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants