Files
rust/library/std/src/sys_common
Matthias Krüger c348beacea Rollup merge of #97140 - joboet:solid_parker, r=m-ou-se
std: use an event-flag-based thread parker on SOLID

`Mutex` and `Condvar` are being replaced by more efficient implementations, which need thread parking themselves (see #93740). Therefore, the generic `Parker` needs to be replaced on all platforms where the new lock implementation will be used, which, after #96393, are SOLID, SGX and Hermit (more PRs coming soon).

SOLID, conforming to the [μITRON specification](http://www.ertl.jp/ITRON/SPEC/FILE/mitron-400e.pdf), has event flags, which are a thread parking primitive very similar to `Parker`. However, they do not make any atomic ordering guarantees (even though those can probably be assumed) and necessitate a system call even when the thread token is already available. Hence, this `Parker`, like the Windows parker, uses an extra atomic state variable.

I future-proofed the code by wrapping the event flag in a `WaitFlag` structure, as both SGX and Hermit can share the Parker implementation, they just have slightly different primitives (SGX uses signals and Hermit has a thread blocking API).

`````@kawadakk````` I assume you are the target maintainer? Could you test this for me?
2022-06-26 19:46:59 +02:00
..
2022-06-03 17:04:14 +02:00
2021-05-14 03:54:46 +02:00
2021-08-22 16:35:29 +02:00
2021-05-14 03:54:46 +02:00
2022-06-03 17:04:14 +02:00
2022-06-20 23:02:21 +02:00
2021-12-29 10:07:44 +01:00
2022-06-20 23:02:21 +02:00
2022-05-09 11:12:32 +02:00