1 //! Futures-powered synchronization primitives.
2 //!
3 //! This module is only available when the `std` or `alloc` feature of this
4 //! library is activated, and it is activated by default.
5 
6 cfg_target_has_atomic! {
7     #[cfg(feature = "std")]
8     mod mutex;
9     #[cfg(feature = "std")]
10     pub use self::mutex::{MappedMutexGuard, Mutex, MutexLockFuture, MutexGuard};
11 
12     #[cfg(any(feature = "bilock", feature = "sink", feature = "io"))]
13     #[cfg_attr(docsrs, doc(cfg(feature = "bilock")))]
14     #[cfg_attr(not(feature = "bilock"), allow(unreachable_pub))]
15     mod bilock;
16     #[cfg(feature = "bilock")]
17     #[cfg_attr(docsrs, doc(cfg(feature = "bilock")))]
18     pub use self::bilock::{BiLock, BiLockAcquire, BiLockGuard, ReuniteError};
19     #[cfg(any(feature = "sink", feature = "io"))]
20     #[cfg(not(feature = "bilock"))]
21     pub(crate) use self::bilock::BiLock;
22 }
23