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

gh-95174: Add pthread stubs for WASI (GH-95234) #95234

Merged
merged 6 commits into from Jul 27, 2022

Conversation

tiran
Copy link
Member

@tiran tiran commented Jul 25, 2022

Neither WASI nor default builds with Emscripten have support for
threading. While Emscripten comes with pthread stubs, WASI-SDK 16 and
earlier are lacking stubs.

Python initially used WASIX stubs to provide pthread stubs. This
changeset introduces stubs modelled after Emscripten's stubs.

Emscripten without pthread emulation now has sys.thread_info.name
pthread-stubs, too.

@tiran
Copy link
Member Author

tiran commented Jul 25, 2022

PR depends on GH-95179 and GH-95229.

@tiran tiran requested a review from brettcannon Jul 25, 2022
@tiran tiran force-pushed the gh-95174-pthread-stubs branch from bfbe629 to 6d44757 Compare Jul 25, 2022
@tiran tiran marked this pull request as ready for review Jul 25, 2022
Include/cpython/pthread_stubs.h Outdated Show resolved Hide resolved
Include/cpython/pthread_stubs.h Outdated Show resolved Hide resolved
configure.ac Outdated Show resolved Hide resolved
pyconfig.h.in Outdated Show resolved Hide resolved
@tiran tiran force-pushed the gh-95174-pthread-stubs branch from 9418dce to 83cdef3 Compare Jul 27, 2022
@tiran tiran added the 🔨 test-with-buildbots label Jul 27, 2022
@bedevere-bot
Copy link

bedevere-bot commented Jul 27, 2022

🤖 New build scheduled with the buildbot fleet by @tiran for commit 45c87f0d043fbfd14b09140e070bfc3aa8724f27 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots label Jul 27, 2022
@tiran
Copy link
Member Author

tiran commented Jul 27, 2022

The changeset breaks wasm32-wasi buildbot because our current buildbot configurations hard-codes WASIX. PRs #95320 and python/buildmaster-config#337 will change set. I will continue with this PR after GH-95320 has been backported to 3.11 and the buildbots are running with new configuration.

tiran and others added 5 commits Jul 27, 2022
Neither WASI nor default builds with Emscripten have support for
threading. While Emscripten comes with pthread stubs, WASI-SDK 16 and
earlier are lacking stubs.

Python initially used WASIX stubs to provide pthread stubs. This
changeset introduces stubs modelled after Emscripten's stubs.

Emscripten without pthread emulation now has ``sys.thread_info.name``
``pthread-stubs``, too.
Co-authored-by: Brett Cannon <brett@python.org>
@tiran tiran force-pushed the gh-95174-pthread-stubs branch from 45c87f0 to 503ef05 Compare Jul 27, 2022
@tiran tiran added the 🔨 test-with-buildbots label Jul 27, 2022
@bedevere-bot
Copy link

bedevere-bot commented Jul 27, 2022

🤖 New build scheduled with the buildbot fleet by @tiran for commit 503ef05 🤖

If you want to schedule another build, you need to add the "🔨 test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots label Jul 27, 2022
@tiran tiran changed the title gh-95174: Add pthread stubs for WASI gh-95174: Add pthread stubs for WASI (GH-95234) Jul 27, 2022
@tiran tiran merged commit 0fe645d into python:main Jul 27, 2022
14 checks passed
@miss-islington
Copy link
Contributor

miss-islington commented Jul 27, 2022

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Jul 27, 2022

Sorry, @tiran, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 0fe645d6fd22a6f57e777a29e65cf9a4ff9785ae 3.11

@tiran tiran deleted the gh-95174-pthread-stubs branch Jul 27, 2022
@tiran
Copy link
Member Author

tiran commented Jul 27, 2022

Backport to 3.11 depends on GH-95272 and GH-95308

@miss-islington
Copy link
Contributor

miss-islington commented Jul 31, 2022

Thanks @tiran for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒🤖

@miss-islington
Copy link
Contributor

miss-islington commented Jul 31, 2022

Sorry, @tiran, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 0fe645d6fd22a6f57e777a29e65cf9a4ff9785ae 3.11

tiran added a commit to tiran/cpython that referenced this issue Jul 31, 2022
Co-authored-by: Brett Cannon <brett@python.org>.
(cherry picked from commit 0fe645d)

Co-authored-by: Christian Heimes <christian@python.org>
@bedevere-bot
Copy link

bedevere-bot commented Jul 31, 2022

GH-95503 is a backport of this pull request to the 3.11 branch.

pablogsal pushed a commit that referenced this issue Aug 1, 2022
Co-authored-by: Brett Cannon <brett@python.org>.
(cherry picked from commit 0fe645d)

Co-authored-by: Christian Heimes <christian@python.org>
@kanavin
Copy link

kanavin commented Aug 19, 2022

This PR introduces an incorrect condition, please see my comment in the code.

@tiran
Copy link
Member Author

tiran commented Aug 19, 2022

Could you please open a new ticket? Issues are easier to track than comments on closed PRs.

@kanavin
Copy link

kanavin commented Aug 19, 2022

Could you please open a new ticket? Issues are easier to track than comments on closed PRs.

#96125

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.

None yet

5 participants