std/sys/sync/thread_parking/
mod.rs
1cfg_if::cfg_if! {
2 if #[cfg(any(
3 all(target_os = "windows", not(target_vendor = "win7")),
4 target_os = "linux",
5 target_os = "android",
6 all(target_arch = "wasm32", target_feature = "atomics"),
7 target_os = "freebsd",
8 target_os = "openbsd",
9 target_os = "dragonfly",
10 target_os = "fuchsia",
11 target_os = "hermit",
12 ))] {
13 mod futex;
14 pub use futex::Parker;
15 } else if #[cfg(any(
16 target_os = "netbsd",
17 all(target_vendor = "fortanix", target_env = "sgx"),
18 target_os = "solid_asp3",
19 ))] {
20 mod id;
21 pub use id::Parker;
22 } else if #[cfg(target_vendor = "win7")] {
23 mod windows7;
24 pub use windows7::Parker;
25 } else if #[cfg(all(target_vendor = "apple", not(miri)))] {
26 mod darwin;
28 pub use darwin::Parker;
29 } else if #[cfg(target_os = "xous")] {
30 mod xous;
31 pub use xous::Parker;
32 } else if #[cfg(target_family = "unix")] {
33 mod pthread;
34 pub use pthread::Parker;
35 } else {
36 mod unsupported;
37 pub use unsupported::Parker;
38 }
39}