Skip to content
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

Move thread parking to sys::sync #124159

Merged
merged 1 commit into from
May 4, 2024
Merged

Conversation

joboet
Copy link
Member

@joboet joboet commented Apr 19, 2024

Part of #117276.

I'll leave the platform-specific API abstractions in sys::pal, as per the initial proposal. I'm not entirely sure whether we'll want to keep it that way, but that remains to be seen.

r? @ChrisDenton (if you have time)

@rustbot rustbot added 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. labels Apr 19, 2024
@joboet joboet force-pushed the move_pal_thread_parking branch from f4b0d51 to 6818915 Compare April 23, 2024 09:49
Comment on lines +1 to +3
// Only used on NetBSD. If other platforms start using id-based parking, use
// separate modules for each platform.
#![cfg(target_os = "netbsd")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... I'm not sure I love this being unix/thread_parking.rs with nothing in the path to indicate it's highly platform specific. If more unix targets do use id-based parking, what should they call their modules? How would that be organised?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then I'd split them unix/thread_parking/netbsd.rs/unix/thread_parking/*.rs and expose the relevant inferface in unix/thread_parking/mod.rs.

@bors
Copy link
Contributor

bors commented May 1, 2024

☔ The latest upstream changes (presumably #124491) made this pull request unmergeable. Please resolve the merge conflicts.

@joboet joboet force-pushed the move_pal_thread_parking branch from 6818915 to a56fd37 Compare May 2, 2024 10:39
@ChrisDenton
Copy link
Member

ChrisDenton commented May 4, 2024

Thanks!

@bors r+

@bors
Copy link
Contributor

bors commented May 4, 2024

📌 Commit a56fd37 has been approved by ChrisDenton

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 4, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request May 4, 2024
…ChrisDenton

Move thread parking to `sys::sync`

Part of rust-lang#117276.

I'll leave the platform-specific API abstractions in `sys::pal`, as per the initial proposal. I'm not entirely sure whether we'll want to keep it that way, but that remains to be seen.

r? `@ChrisDenton` (if you have time)
bors added a commit to rust-lang-ci/rust that referenced this pull request May 4, 2024
…iaskrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#123356 (Reduce code size of `thread::set_current`)
 - rust-lang#124159 (Move thread parking to `sys::sync`)
 - rust-lang#124293 (Let miri and const eval execute intrinsics' fallback bodies)
 - rust-lang#124500 (lldb-formatters: Use StdSliceSyntheticProvider for &str)
 - rust-lang#124677 (Set non-leaf frame pointers on Fuchsia targets)
 - rust-lang#124692 (We do not coerce `&mut &mut T -> *mut mut T`)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request May 4, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#123356 (Reduce code size of `thread::set_current`)
 - rust-lang#124159 (Move thread parking to `sys::sync`)
 - rust-lang#124293 (Let miri and const eval execute intrinsics' fallback bodies)
 - rust-lang#124677 (Set non-leaf frame pointers on Fuchsia targets)
 - rust-lang#124692 (We do not coerce `&mut &mut T -> *mut mut T`)
 - rust-lang#124698 (Rewrite `rustdoc-determinism` test in Rust)
 - rust-lang#124700 (Remove an unnecessary cast)
 - rust-lang#124701 (Docs: suggest `uN::checked_sub` instead of check-then-unchecked)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit cc51f91 into rust-lang:master May 4, 2024
6 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 4, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request May 4, 2024
Rollup merge of rust-lang#124159 - joboet:move_pal_thread_parking, r=ChrisDenton

Move thread parking to `sys::sync`

Part of rust-lang#117276.

I'll leave the platform-specific API abstractions in `sys::pal`, as per the initial proposal. I'm not entirely sure whether we'll want to keep it that way, but that remains to be seen.

r? ``@ChrisDenton`` (if you have time)
@joboet joboet deleted the move_pal_thread_parking branch May 4, 2024 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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