std: use 64-bit clock_nanosleep on GNU/Linux if available#151403
Merged
rust-bors[bot] merged 1 commit intorust-lang:mainfrom Jan 25, 2026
Merged
std: use 64-bit clock_nanosleep on GNU/Linux if available#151403rust-bors[bot] merged 1 commit intorust-lang:mainfrom
clock_nanosleep on GNU/Linux if available#151403rust-bors[bot] merged 1 commit intorust-lang:mainfrom
Conversation
Collaborator
|
The Miri subtree was changed cc @rust-lang/miri |
Collaborator
|
rustbot has assigned @Mark-Simulacrum. Use |
clock_nanosleep on Linux if availableclock_nanosleep on GNU/Linux if available
Member
|
@bors r+ rollup |
Contributor
rust-bors bot
pushed a commit
that referenced
this pull request
Jan 24, 2026
Rollup of 11 pull requests Successful merges: - #149962 (Promote powerpc64-unknown-linux-musl to tier 2 with host tools) - #150138 (Add new Tier 3 targets for ARMv6) - #150905 (Fix(lib/win/net): Remove hostname support under Win7) - #151094 (remote-test-server: Fix compilation on UEFI targets) - #151346 (add `simd_splat` intrinsic) - #151353 (compiletest: Make `aux-crate` directive explicitly handle `--extern` modifiers) - #151538 (std: `sleep_until` on Motor and VEX) - #151098 (Add Korean translation to Rust By Example) - #151157 (Extend build-manifest local test guide) - #151403 (std: use 64-bit `clock_nanosleep` on GNU/Linux if available) - #151571 (Fix cstring-merging test for Hexagon target)
rust-timer
added a commit
that referenced
this pull request
Jan 25, 2026
Rollup merge of #151403 - joboet:clock_nanosleep_time64, r=Mark-Simulacrum std: use 64-bit `clock_nanosleep` on GNU/Linux if available glibc 2.31 added support for both 64-bit `clock_gettime` and 64-bit `clock_nanosleep`. Thus, if [`__clock_nanosleep_time64`](https://sourceware.org/git/?p=glibc.git;a=blob;f=include/time.h;h=22b29ca583549488a0e5395cb820f55ec6e38e5f;hb=e14a91e59d35bf2fa649a9726ccce838b8c6e4b7#l322) and the underlying syscall are available, use them for implementing `sleep_until` to avoid having to fall back to `nanosleep` for long-duration sleeps.
github-actions bot
pushed a commit
to rust-lang/miri
that referenced
this pull request
Jan 25, 2026
Rollup of 11 pull requests Successful merges: - rust-lang/rust#149962 (Promote powerpc64-unknown-linux-musl to tier 2 with host tools) - rust-lang/rust#150138 (Add new Tier 3 targets for ARMv6) - rust-lang/rust#150905 (Fix(lib/win/net): Remove hostname support under Win7) - rust-lang/rust#151094 (remote-test-server: Fix compilation on UEFI targets) - rust-lang/rust#151346 (add `simd_splat` intrinsic) - rust-lang/rust#151353 (compiletest: Make `aux-crate` directive explicitly handle `--extern` modifiers) - rust-lang/rust#151538 (std: `sleep_until` on Motor and VEX) - rust-lang/rust#151098 (Add Korean translation to Rust By Example) - rust-lang/rust#151157 (Extend build-manifest local test guide) - rust-lang/rust#151403 (std: use 64-bit `clock_nanosleep` on GNU/Linux if available) - rust-lang/rust#151571 (Fix cstring-merging test for Hexagon target)
github-actions bot
pushed a commit
to rust-lang/stdarch
that referenced
this pull request
Jan 26, 2026
Rollup of 11 pull requests Successful merges: - rust-lang/rust#149962 (Promote powerpc64-unknown-linux-musl to tier 2 with host tools) - rust-lang/rust#150138 (Add new Tier 3 targets for ARMv6) - rust-lang/rust#150905 (Fix(lib/win/net): Remove hostname support under Win7) - rust-lang/rust#151094 (remote-test-server: Fix compilation on UEFI targets) - rust-lang/rust#151346 (add `simd_splat` intrinsic) - rust-lang/rust#151353 (compiletest: Make `aux-crate` directive explicitly handle `--extern` modifiers) - rust-lang/rust#151538 (std: `sleep_until` on Motor and VEX) - rust-lang/rust#151098 (Add Korean translation to Rust By Example) - rust-lang/rust#151157 (Extend build-manifest local test guide) - rust-lang/rust#151403 (std: use 64-bit `clock_nanosleep` on GNU/Linux if available) - rust-lang/rust#151571 (Fix cstring-merging test for Hexagon target)
github-actions bot
pushed a commit
to rust-lang/rustc-dev-guide
that referenced
this pull request
Jan 26, 2026
Rollup of 11 pull requests Successful merges: - rust-lang/rust#149962 (Promote powerpc64-unknown-linux-musl to tier 2 with host tools) - rust-lang/rust#150138 (Add new Tier 3 targets for ARMv6) - rust-lang/rust#150905 (Fix(lib/win/net): Remove hostname support under Win7) - rust-lang/rust#151094 (remote-test-server: Fix compilation on UEFI targets) - rust-lang/rust#151346 (add `simd_splat` intrinsic) - rust-lang/rust#151353 (compiletest: Make `aux-crate` directive explicitly handle `--extern` modifiers) - rust-lang/rust#151538 (std: `sleep_until` on Motor and VEX) - rust-lang/rust#151098 (Add Korean translation to Rust By Example) - rust-lang/rust#151157 (Extend build-manifest local test guide) - rust-lang/rust#151403 (std: use 64-bit `clock_nanosleep` on GNU/Linux if available) - rust-lang/rust#151571 (Fix cstring-merging test for Hexagon target)
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.
glibc 2.31 added support for both 64-bit
clock_gettimeand 64-bitclock_nanosleep. Thus, if__clock_nanosleep_time64and the underlying syscall are available, use them for implementingsleep_untilto avoid having to fall back tonanosleepfor long-duration sleeps.