1#![warn(missing_docs)]
13#![warn(rust_2018_idioms)]
14
15mod condvar;
16mod elision;
17mod fair_mutex;
18mod mutex;
19mod once;
20mod raw_condvar;
21mod raw_fair_mutex;
22mod raw_mutex;
23mod raw_rwlock;
24mod remutex;
25mod rwlock;
26mod util;
27
28#[cfg(feature = "deadlock_detection")]
29pub mod deadlock;
30#[cfg(not(feature = "deadlock_detection"))]
31mod deadlock;
32
33#[cfg(all(feature = "send_guard", feature = "deadlock_detection"))]
36compile_error!("the `send_guard` and `deadlock_detection` features cannot be used together");
37#[cfg(feature = "send_guard")]
38type GuardMarker = lock_api::GuardSend;
39#[cfg(not(feature = "send_guard"))]
40type GuardMarker = lock_api::GuardNoSend;
41
42pub use self::condvar::{Condvar, WaitTimeoutResult};
43pub use self::fair_mutex::{const_fair_mutex, FairMutex, FairMutexGuard, MappedFairMutexGuard};
44pub use self::mutex::{const_mutex, MappedMutexGuard, Mutex, MutexGuard};
45pub use self::once::{Once, OnceState};
46pub use self::raw_condvar::RawCondvar;
47pub use self::raw_fair_mutex::RawFairMutex;
48pub use self::raw_mutex::RawMutex;
49pub use self::raw_rwlock::RawRwLock;
50pub use self::remutex::{
51 const_reentrant_mutex, MappedReentrantMutexGuard, RawThreadId, ReentrantMutex,
52 ReentrantMutexGuard,
53};
54pub use self::rwlock::{
55 const_rwlock, MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard,
56 RwLockUpgradableReadGuard, RwLockWriteGuard,
57};
58pub use ::lock_api;
59
60#[cfg(feature = "arc_lock")]
61pub use self::lock_api::{
62 ArcMutexGuard, ArcReentrantMutexGuard, ArcRwLockReadGuard, ArcRwLockUpgradableReadGuard,
63 ArcRwLockWriteGuard,
64};