Skip to main content

std/sys/sync/thread_parking/
mod.rs

1cfg_select! {
2    any(
3        all(target_os = "windows", not(target_vendor = "win7")),
4        target_os = "linux",
5        target_os = "android",
6        all(target_family = "wasm", target_feature = "atomics"),
7        target_os = "freebsd",
8        target_os = "openbsd",
9        target_os = "dragonfly",
10        target_os = "fuchsia",
11        target_os = "motor",
12        target_os = "hermit",
13        all(target_os = "wasi", target_env = "p3"),
14    ) => {
15        mod futex;
16        pub use futex::Parker;
17    }
18    any(
19        target_os = "netbsd",
20        all(target_vendor = "fortanix", target_env = "sgx"),
21        target_os = "solid_asp3",
22    ) => {
23        mod id;
24        pub use id::Parker;
25    }
26    target_vendor = "win7" => {
27        mod windows7;
28        pub use windows7::Parker;
29    }
30    all(target_vendor = "apple", not(miri)) => {
31        // Doesn't work in Miri, see <https://github.com/rust-lang/miri/issues/2589>.
32        mod darwin;
33        pub use darwin::Parker;
34    }
35    target_os = "xous" => {
36        mod xous;
37        pub use xous::Parker;
38    }
39    any(target_family = "unix", target_os = "teeos") => {
40        mod pthread;
41        pub use pthread::Parker;
42    }
43    _ => {
44        mod unsupported;
45        pub use unsupported::Parker;
46    }
47}