2022-03-17 12:29:07 +01:00
|
|
|
cfg_if::cfg_if! {
|
|
|
|
|
if #[cfg(any(
|
|
|
|
|
target_os = "linux",
|
|
|
|
|
target_os = "android",
|
2022-04-19 09:20:06 +02:00
|
|
|
all(target_os = "emscripten", target_feature = "atomics"),
|
2022-04-28 12:22:14 +02:00
|
|
|
target_os = "freebsd",
|
2022-04-28 10:32:11 +02:00
|
|
|
target_os = "openbsd",
|
2022-04-28 11:28:40 +02:00
|
|
|
target_os = "dragonfly",
|
2022-03-17 12:29:07 +01:00
|
|
|
))] {
|
2022-06-30 11:48:54 +02:00
|
|
|
mod futex_mutex;
|
2022-04-06 16:31:11 +02:00
|
|
|
mod futex_rwlock;
|
2022-06-30 11:48:54 +02:00
|
|
|
mod futex_condvar;
|
|
|
|
|
pub(crate) use futex_mutex::{Mutex, MovableMutex};
|
2022-06-03 17:04:14 +02:00
|
|
|
pub(crate) use futex_rwlock::{RwLock, MovableRwLock};
|
2022-06-30 11:48:54 +02:00
|
|
|
pub(crate) use futex_condvar::MovableCondvar;
|
|
|
|
|
} else if #[cfg(target_os = "fuchsia")] {
|
|
|
|
|
mod fuchsia_mutex;
|
|
|
|
|
mod futex_rwlock;
|
|
|
|
|
mod futex_condvar;
|
|
|
|
|
pub(crate) use fuchsia_mutex::{Mutex, MovableMutex};
|
|
|
|
|
pub(crate) use futex_rwlock::{RwLock, MovableRwLock};
|
|
|
|
|
pub(crate) use futex_condvar::MovableCondvar;
|
2022-03-17 12:29:07 +01:00
|
|
|
} else {
|
|
|
|
|
mod pthread_mutex;
|
|
|
|
|
mod pthread_rwlock;
|
|
|
|
|
mod pthread_condvar;
|
2022-06-03 17:04:14 +02:00
|
|
|
pub(crate) use pthread_mutex::{Mutex, MovableMutex};
|
|
|
|
|
pub(crate) use pthread_rwlock::{RwLock, MovableRwLock};
|
|
|
|
|
pub(crate) use pthread_condvar::MovableCondvar;
|
2022-03-17 12:29:07 +01:00
|
|
|
}
|
|
|
|
|
}
|