rust/library
Michael Goulet ff3326d925
Rollup merge of #105903 - joboet:unify_parking, r=m-ou-se
Unify id-based thread parking implementations

Multiple platforms currently use thread-id-based parking implementations (NetBSD and SGX[^1]). Even though the strategy does not differ, these are duplicated for each platform, as the id is encoded into an atomic thread variable in different ways for each platform.

Since `park` is only called by one thread, it is possible to move the thread id into a separate field. By ensuring that the field is only written to once, before any other threads access it, these accesses can be unsynchronized, removing any restrictions on the size and niches of the thread id.

This PR also renames the internal `thread_parker` modules to `thread_parking`, as that name now better reflects their contents. I hope this does not add too much reviewing noise.

r? `@m-ou-se`

`@rustbot` label +T-libs

[^1]: SOLID supports this as well, I will switch it over in a follow-up PR.
2022-12-30 21:26:33 -08:00
..
alloc Update paths in comments. 2022-12-30 14:00:42 +01:00
backtrace@07872f28cd Update backtrace 2022-09-02 16:09:58 -04:00
core Auto merge of #105651 - tgross35:once-cell-inline, r=m-ou-se 2022-12-30 19:22:33 +00:00
panic_abort Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
panic_unwind Replace libstd, libcore, liballoc in docs. 2022-12-30 14:00:40 +01:00
portable-simd Fix rustdoc lints 2022-11-06 17:21:22 -05:00
proc_macro Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
profiler_builtins Fully stabilize NLL 2022-06-03 17:16:41 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #105903 - joboet:unify_parking, r=m-ou-se 2022-12-30 21:26:33 -08:00
stdarch@790411f93c library: update stdarch submodule 2022-10-13 09:41:16 +08:00
test Fix uninlined_format_args in libtest 2022-12-19 08:58:40 +01:00
unwind Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00