| 1 | cfg_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 | target_os = "freebsd" , |
| 7 | target_os = "openbsd" , |
| 8 | target_os = "dragonfly" , |
| 9 | all(target_family = "wasm" , target_feature = "atomics" ), |
| 10 | target_os = "hermit" , |
| 11 | ))] { |
| 12 | mod futex; |
| 13 | pub use futex::Mutex; |
| 14 | } else if #[cfg(target_os = "fuchsia" )] { |
| 15 | mod fuchsia; |
| 16 | pub use fuchsia::Mutex; |
| 17 | } else if #[cfg(any( |
| 18 | target_family = "unix" , |
| 19 | target_os = "teeos" , |
| 20 | ))] { |
| 21 | mod pthread; |
| 22 | pub use pthread::Mutex; |
| 23 | } else if #[cfg(all(target_os = "windows" , target_vendor = "win7" ))] { |
| 24 | mod windows7; |
| 25 | pub use windows7::{Mutex, raw}; |
| 26 | } else if #[cfg(all(target_vendor = "fortanix" , target_env = "sgx" ))] { |
| 27 | mod sgx; |
| 28 | pub use sgx::Mutex; |
| 29 | } else if #[cfg(target_os = "solid_asp3" )] { |
| 30 | mod itron; |
| 31 | pub use itron::Mutex; |
| 32 | } else if #[cfg(target_os = "xous" )] { |
| 33 | mod xous; |
| 34 | pub use xous::Mutex; |
| 35 | } else { |
| 36 | mod no_threads; |
| 37 | pub use no_threads::Mutex; |
| 38 | } |
| 39 | } |
| 40 | |