-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
Remove Fuchsia from target OS list in unix.rs for sleep #151706
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also update https://github.com/rust-lang/rust/blob/main/library/std/src/thread/functions.rs#L319 to say fuchsia is using nanosleep?
library/std/src/sys/thread/unix.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we'll also need to update this code as well. However, it looks like this code has been in Rust for a couple months now, and was added in #145177. Looking through Fuchsia it seems like we've never used this API and didn't notice it was using the wrong one? I'll do a trial run of removing this function and make sure it doesn't break things for us.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't realize sleep_until hasn't stabilized, so it makes sense we didn't notice this. So I think we can put fixing that off for a future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added it to this one
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NM. Will save that for a future PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I think it'd be better to remove this line now – this PR should fix all the bugs resulting from Fuchsia's lacking clock_nanosleep support. Leaving an actual working sleep_until implementation for a future PR sounds like a good idea though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
|
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. |
This comment has been minimized.
This comment has been minimized.
Done |
This comment has been minimized.
This comment has been minimized.
|
Reminder, once the PR becomes ready for a review, use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The #[cfg] on the generic sleep_until in sys/thread/mod.rs needs to be updated, too. And could you please squash your commits?
|
r? joboet |
6304f16 to
ff0aec3
Compare
Done |
library/std/src/sys/thread/mod.rs
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line also needs to be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
May I suggest running |
ff0aec3 to
5dbaac1
Compare
Thanks. I don't work on rust a lot so this was helpful. |
|
Thanks! |
…uwer Rollup of 12 pull requests Successful merges: - #150491 (resolve: Mark items under exported ambiguous imports as exported) - #150720 (Do not suggest `derive` if there is already an impl) - #150968 (compiler-builtins: Remove the no-f16-f128 feature) - #151493 ([RFC] rustc_parse: improve the error diagnostic for "missing let in let chain") - #151660 (Bump `std`'s `backtrace`'s `rustc-demangle`) - #151696 (Borrowck: Simplify SCC annotation computation, placeholder rewriting) - #151704 (Implement `set_output_kind` for Emscripten linker) - #151706 (Remove Fuchsia from target OS list in unix.rs for sleep) - #151769 (fix undefined behavior in VecDeque::splice) - #151779 (stdarch subtree update) - #151449 ([rustdoc] Add regression test for #151411) - #151773 (clean up checks for constant promotion of integer division/remainder operations)
Rollup merge of #151706 - PiJoules:fuchsia-nanosleep, r=joboet Remove Fuchsia from target OS list in unix.rs for sleep Fuchsia doesn't support clock_nanosleep so default back to using nanosleep
…uwer Rollup of 12 pull requests Successful merges: - rust-lang/rust#150491 (resolve: Mark items under exported ambiguous imports as exported) - rust-lang/rust#150720 (Do not suggest `derive` if there is already an impl) - rust-lang/rust#150968 (compiler-builtins: Remove the no-f16-f128 feature) - rust-lang/rust#151493 ([RFC] rustc_parse: improve the error diagnostic for "missing let in let chain") - rust-lang/rust#151660 (Bump `std`'s `backtrace`'s `rustc-demangle`) - rust-lang/rust#151696 (Borrowck: Simplify SCC annotation computation, placeholder rewriting) - rust-lang/rust#151704 (Implement `set_output_kind` for Emscripten linker) - rust-lang/rust#151706 (Remove Fuchsia from target OS list in unix.rs for sleep) - rust-lang/rust#151769 (fix undefined behavior in VecDeque::splice) - rust-lang/rust#151779 (stdarch subtree update) - rust-lang/rust#151449 ([rustdoc] Add regression test for rust-lang/rust#151411) - rust-lang/rust#151773 (clean up checks for constant promotion of integer division/remainder operations)
Fuchsia doesn't support clock_nanosleep so default back to using nanosleep