Skip to content

Implement precise pthread wakeups#26659

Open
sbc100 wants to merge 2 commits intoemscripten-core:mainfrom
sbc100:precise_wakeups
Open

Implement precise pthread wakeups#26659
sbc100 wants to merge 2 commits intoemscripten-core:mainfrom
sbc100:precise_wakeups

Conversation

@sbc100
Copy link
Copy Markdown
Collaborator

@sbc100 sbc100 commented Apr 9, 2026

This change implements the design in docs/design/01-precise-futex-wakeups.md

As part of this change emscripten_futex_wait API now explicitly allows spurious wakeups, much like the corresponding linux syscall. There were a couple of tests that were using emscripten_futex_wait without a loop, so I added loops to them in an abundance of caution.

Fixes: #26633

@sbc100 sbc100 force-pushed the precise_wakeups branch 3 times, most recently from 61f016e to 20d6937 Compare April 9, 2026 16:56
@sbc100 sbc100 requested a review from tlively April 9, 2026 16:56
@tlively
Copy link
Copy Markdown
Member

tlively commented Apr 9, 2026

"implemenat" => "implements" in description.

@sbc100 sbc100 force-pushed the precise_wakeups branch from 20d6937 to 96b8d1e Compare April 9, 2026 20:15
This change implements the design in docs/design/01-precise-futex-wakeups.md

Note: As part of this change the definition of emscripten_futex_wait
was changes to explicitly allow spurious wakeups.

Fixes: emscripten-core#26633
@sbc100 sbc100 force-pushed the precise_wakeups branch 2 times, most recently from cb1c872 to 8dc3c30 Compare April 11, 2026 00:49
@sbc100 sbc100 requested a review from tlively April 11, 2026 00:50
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.

Can we avoid continuous wakeups in emscripten_futex_wait?

2 participants