Files
rust/library/std/src/sys/unix/locks/mod.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
730 B
Rust
Raw Normal View History

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"),
target_os = "freebsd",
target_os = "openbsd",
target_os = "dragonfly",
))] {
mod futex;
2022-04-06 16:31:11 +02:00
mod futex_rwlock;
2022-06-03 17:04:14 +02:00
pub(crate) use futex::{Mutex, MovableMutex, MovableCondvar};
pub(crate) use futex_rwlock::{RwLock, MovableRwLock};
} 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;
}
}