diff options
Diffstat (limited to 'library/std/src/sys_common/thread_parker/mod.rs')
-rw-r--r-- | library/std/src/sys_common/thread_parker/mod.rs | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/library/std/src/sys_common/thread_parker/mod.rs b/library/std/src/sys_common/thread_parker/mod.rs new file mode 100644 index 000000000..cbd7832eb --- /dev/null +++ b/library/std/src/sys_common/thread_parker/mod.rs @@ -0,0 +1,22 @@ +cfg_if::cfg_if! { + if #[cfg(any( + target_os = "linux", + target_os = "android", + all(target_arch = "wasm32", target_feature = "atomics"), + target_os = "freebsd", + target_os = "openbsd", + target_os = "dragonfly", + target_os = "fuchsia", + ))] { + mod futex; + pub use futex::Parker; + } else if #[cfg(target_os = "solid_asp3")] { + mod wait_flag; + pub use wait_flag::Parker; + } else if #[cfg(any(windows, target_family = "unix"))] { + pub use crate::sys::thread_parker::Parker; + } else { + mod generic; + pub use generic::Parker; + } +} |