Skip to content

Specialize sleep_until implementation for unix (except mac) #141829

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

dvdsk
Copy link
Contributor

@dvdsk dvdsk commented May 31, 2025

related tracking issue: #113752
Supersedes #118480 for the reasons see: #113752 (comment)

Replaces the generic catch all implementation with target_os specific ones for: linux/netbsd/freebsd/android/solaris/illumos etc. Other platforms like wasi, macos/ios/tvos/watchos and windows will follow in later separate PR's (once this is merged).

@rustbot
Copy link
Collaborator

rustbot commented May 31, 2025

r? @tgross35

rustbot has assigned @tgross35.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels May 31, 2025
@dvdsk
Copy link
Contributor Author

dvdsk commented May 31, 2025

r? @cuviper

@rustbot rustbot assigned cuviper and unassigned tgross35 May 31, 2025
@workingjubilee workingjubilee changed the title Specialize sleep_until implementation for unix (expect mac) Specialize sleep_until implementation for unix (except mac) May 31, 2025
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk force-pushed the sleep_until_linux branch from 8010ec8 to 295e8d1 Compare May 31, 2025 19:54
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk force-pushed the sleep_until_linux branch from 295e8d1 to 1e7d958 Compare May 31, 2025 20:04
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk force-pushed the sleep_until_linux branch from 1e7d958 to 406e32b Compare May 31, 2025 21:31
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk marked this pull request as draft May 31, 2025 22:37
@dvdsk
Copy link
Contributor Author

dvdsk commented May 31, 2025

This can be done without touching all pal's, ill be doing that tomorrow, now its bed time 😴

edit: I was mistaken, tidy does not allow #[cfg(...)] in strc/thread/mod.rs probably for a good reason. Therefore we need a trivial not platform specific sleep_until in every pal that does not have a specialized one.

@rustbot rustbot added the O-wasm Target: WASM (WebAssembly), http://webassembly.org/ label Jun 1, 2025
@dvdsk dvdsk force-pushed the sleep_until_linux branch from 4bcfd27 to f657ec1 Compare June 1, 2025 07:08
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk force-pushed the sleep_until_linux branch from f657ec1 to 1127a50 Compare June 1, 2025 07:26
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk force-pushed the sleep_until_linux branch from 1127a50 to 60edd5a Compare June 1, 2025 07:35
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk force-pushed the sleep_until_linux branch from 60edd5a to 6b4166b Compare June 1, 2025 07:56
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk force-pushed the sleep_until_linux branch from 6b4166b to 6c545ee Compare June 1, 2025 16:12
@rust-log-analyzer

This comment has been minimized.

@dvdsk dvdsk marked this pull request as ready for review June 2, 2025 21:51
dvdsk and others added 3 commits June 3, 2025 08:52
Except for unix they are all copies of the existing non platform
specific implementation. This is the only way since tidy does not allow
`#[cfg(target_os = ` in src/thread/mod.rs. Once this is merged more
specializations will follow.
@dvdsk dvdsk force-pushed the sleep_until_linux branch from c2557d0 to 5065a35 Compare June 3, 2025 07:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
O-hermit Operating System: Hermit O-itron Operating System: ITRON O-SGX Target: SGX O-unix Operating system: Unix-like O-wasi Operating system: Wasi, Webassembly System Interface O-wasm Target: WASM (WebAssembly), http://webassembly.org/ O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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.

5 participants