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

23 lines
714 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 = "openbsd",
target_os = "netbsd",
target_os = "dragonfly",
))] {
mod futex;
2022-04-06 16:31:11 +02:00
mod futex_rwlock;
pub use futex::{Mutex, MovableMutex, Condvar, MovableCondvar};
2022-04-06 16:31:11 +02:00
pub use futex_rwlock::{RwLock, MovableRwLock};
} else {
mod pthread_mutex;
mod pthread_rwlock;
mod pthread_condvar;
pub use pthread_mutex::{Mutex, MovableMutex};
2022-04-06 16:33:53 +02:00
pub use pthread_rwlock::{RwLock, MovableRwLock};
pub use pthread_condvar::{Condvar, MovableCondvar};
}
}