std: move futex implementations into sys::sync::futex - #158726
Open
valentynkit wants to merge 2 commits into
Open
std: move futex implementations into sys::sync::futex#158726valentynkit wants to merge 2 commits into
valentynkit wants to merge 2 commits into
Conversation
Collaborator
|
|
valentynkit
marked this pull request as ready for review
July 3, 2026 15:06
Pure file moves; the module path repointing and platform gating follow in the next commit. Recorded in .git-blame-ignore-revs so blame skips the rename.
Select the platform implementation with a cfg_select! in sys::sync::futex, repoint each one at the pal primitives it uses (time, fuchsia, the windows api module, hermit_abi), and remove the now-unused futex declarations from the pal modules. The sync primitives import crate::sys::sync::futex rather than the crate::sys::futex glob re-export.
valentynkit
force-pushed
the
sys-sync-futex
branch
from
July 29, 2026 08:44
5191a4a to
5b40f3d
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Contributor
Author
|
Rebased onto master, and extended the move to cover the wasi futex from #159731, which landed in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #117276.
Moves the futex primitives out of the per-platform
sys::palmodules into a singlesys::sync::futex, selected withcfg_select!the same way the othersys::syncbackends are.Every consumer of these primitives already lives in
sys::sync(mutex, rwlock, once, condvar, thread_parking), so they now importcrate::sys::sync::futexdirectly instead of reachingcrate::sys::futexthrough thepub use pal::*glob.I placed it under
sys::syncrather than a top-levelsys::futexbecause the futex API only backs thesys::syncprimitives and sits next to the existingsys::sync::thread_parkingbackend.Happy to place it to
sys::futexif you would rather have it as a peer of the other feature modules.The file moves are a separate commit, recorded in
.git-blame-ignore-revsso blame skips the rename.r? joboet