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

Split the pthread library out of libc. NFC #22735

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

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Oct 14, 2024

The idea here is that, as a followup we could then collapse libc-mt and libc-ww into a single libc-mt that didn't have any specific pthread stuff in it.

@sbc100
Copy link
Collaborator Author

sbc100 commented Oct 14, 2024

@eyebrowsoffire

@sbc100 sbc100 force-pushed the pthread_library branch 2 times, most recently from ef291c2 to 09f48a0 Compare October 14, 2024 23:54
@sbc100 sbc100 requested a review from kripken October 15, 2024 00:31
@@ -5995,9 +5995,9 @@ def test_bad_lookup(self):
# partial list, but ok since we grab them as needed
'parial': [{'EMCC_FORCE_STDLIBS': 'libc++'}, False],
# fail! not enough stdlibs
'partial_only': [{'EMCC_FORCE_STDLIBS': 'libc++,libc,libc++abi', 'EMCC_ONLY_FORCED_STDLIBS': '1'}, True],
'partial_only': [{'EMCC_FORCE_STDLIBS': 'libc++,libc,libpthread,libc++abi', 'EMCC_ONLY_FORCED_STDLIBS': '1'}, True],
Copy link
Member

Choose a reason for hiding this comment

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

Worth a changelog mention because this is observable by some users.

@sbc100 sbc100 marked this pull request as draft October 15, 2024 16:43
@sbc100
Copy link
Collaborator Author

sbc100 commented Oct 15, 2024

This change still needs some work.

sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 15, 2024
Instead we can use TLS which works for both single and multithreaded
builds and also works with wasm workers.

This is also needed for emscripten-core#22735
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 15, 2024
Instead we can use TLS which works for both single and multithreaded
builds and also works with wasm workers.

This is also needed for emscripten-core#22735
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 15, 2024
Instead we can use TLS which works for both single and multithreaded
builds and also works with wasm workers.

This is also needed for emscripten-core#22735
@sbc100 sbc100 force-pushed the pthread_library branch 2 times, most recently from c46a95c to 086be0b Compare October 15, 2024 21:08
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 15, 2024
Previously the wasm workers build of `__errno_location` was using the
single threaded code path which doesn't use a thead local location.

In addition this change avoids the use of `__EMSCRIPTEN_PTHREADS__` in
`__errno_location.c` which is helpful for unifying the shared memory
libc build.  See emscripten-core#22735.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 15, 2024
Previously the wasm workers build of `__errno_location` was using the
single threaded code path which doesn't use a thead local location.

In addition this change avoids the use of `__EMSCRIPTEN_PTHREADS__` in
`__errno_location.c` which is helpful for unifying the shared memory
libc build.  See emscripten-core#22735.
@sbc100 sbc100 force-pushed the pthread_library branch 2 times, most recently from afb65ba to 4f9aa81 Compare October 15, 2024 23:32
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 16, 2024
The MTLibrary subclass is designed for libraries that build in all
different modes.  I think the wasm_workers library and the plans
pthreads library should not be inheriting from this class.

This is needed for both emscripten-core#22683 and emscripten-core#22735.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 16, 2024
Previously the wasm workers build of `__errno_location` was using the
single threaded code path which doesn't use a thead local location.

In addition this change avoids the use of `__EMSCRIPTEN_PTHREADS__` in
`__errno_location.c` which is helpful for unifying the shared memory
libc build.  See emscripten-core#22735.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 16, 2024
The MTLibrary subclass is designed for libraries that build in all
different modes.  I think the wasm_workers library and the plans
pthreads library should not be inheriting from this class.

This is needed for both emscripten-core#22683 and emscripten-core#22735.
sbc100 added a commit that referenced this pull request Oct 16, 2024
The MTLibrary subclass is designed for libraries that build in all
different modes. I think the wasm_workers library and the planned
pthreads library should not be inheriting from this class.

This is needed for both #22683 and #22735.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 16, 2024
Previously the wasm workers build of `__errno_location` was using the
single threaded code path which doesn't use a thead local location.

In addition this change avoids the use of `__EMSCRIPTEN_PTHREADS__` in
`__errno_location.c` which is helpful for unifying the shared memory
libc build.  See emscripten-core#22735.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 16, 2024
Previously the wasm workers build of `__errno_location` was using the
single threaded code path which doesn't use a thead local location.

In addition this change avoids the use of `__EMSCRIPTEN_PTHREADS__` in
`__errno_location.c` which is helpful for unifying the shared memory
libc build.  See emscripten-core#22735.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 16, 2024
Previously the wasm workers build of `__errno_location` was using the
single threaded code path which doesn't use a thead local location.

In addition this change avoids the use of `__EMSCRIPTEN_PTHREADS__` in
`__errno_location.c` which is helpful for unifying the shared memory
libc build.  See emscripten-core#22735.
sbc100 added a commit to sbc100/emscripten that referenced this pull request Oct 16, 2024
Previously the wasm workers build of `__errno_location` was using the
single threaded code path which doesn't use a thead local location.

In addition this change avoids the use of `__EMSCRIPTEN_PTHREADS__` in
`__errno_location.c` which is helpful for unifying the shared memory
libc build.  See emscripten-core#22735.
sbc100 added a commit that referenced this pull request Oct 16, 2024
Previously the wasm workers build of `__errno_location` was using the
single threaded code path which doesn't use a thead local location.

In addition this change avoids the use of `__EMSCRIPTEN_PTHREADS__` in
`__errno_location.c` which is helpful for unifying the shared memory
libc build.  See #22735.
@sbc100 sbc100 force-pushed the pthread_library branch 2 times, most recently from a8d7355 to b4da8b0 Compare October 18, 2024 21:07
@sbc100 sbc100 marked this pull request as ready for review October 24, 2024 20:52
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