Skip to content

Use futex locks on emscripten. #96205

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

Merged
merged 2 commits into from
Apr 20, 2022
Merged

Conversation

m-ou-se
Copy link
Member

@m-ou-se m-ou-se commented Apr 19, 2022

This switches Emscripten to the futex-based lock implementations, away from pthread.

Tracking issue: #93740

@m-ou-se m-ou-se added A-concurrency Area: Concurrency O-asmjs Target: asm.js - http://asmjs.org/ T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Apr 19, 2022
@rust-highfive

This comment was marked as off-topic.

@rust-highfive
Copy link
Contributor

r? @thomcc

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 19, 2022
Copy link
Member

@thomcc thomcc left a comment

Choose a reason for hiding this comment

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

LGTM. I guess these do still function on the main thread in browsers, and just busy loop (according to https://emscripten.org/docs/porting/pthreads.html). Good to know.

@thomcc
Copy link
Member

thomcc commented Apr 19, 2022

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 19, 2022

📌 Commit 06a8f05 has been approved by thomcc

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 19, 2022
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Apr 19, 2022
…homcc

Use futex locks on emscripten.

This switches Emscripten to the futex-based lock implementations, away from pthread.

Tracking issue: rust-lang#93740
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 20, 2022
Rollup of 6 pull requests

Successful merges:

 - rust-lang#95740 (asm: Add a kreg0 register class on x86 which includes k0)
 - rust-lang#95813 (Remove extra space before a where clause)
 - rust-lang#96029 (Refactor loop into iterator; simplify negation logic.)
 - rust-lang#96162 (interpret: Fix writing uninit to an allocation)
 - rust-lang#96165 (Miri provenance cleanup)
 - rust-lang#96205 (Use futex locks on emscripten.)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit da1ddf3 into rust-lang:master Apr 20, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 20, 2022
@m-ou-se m-ou-se deleted the emscripten-futex-locks branch April 20, 2022 04:27
@workingjubilee workingjubilee added the O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! label Oct 11, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
A-concurrency Area: Concurrency O-asmjs Target: asm.js - http://asmjs.org/ O-emscripten Target: 50% off wasm32-unknown-musl. the savings come out of stdio.h, but hey, you get SDL! S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants