|  | 
| 3 | 3 | //! This module is only available when the `std` or `alloc` feature of this | 
| 4 | 4 | //! library is activated, and it is activated by default. | 
| 5 | 5 | 
 | 
| 6 |  | -#[cfg(feature = "std")] | 
| 7 |  | -mod mutex; | 
| 8 |  | -#[cfg(feature = "std")] | 
| 9 |  | -pub use self::mutex::{MappedMutexGuard, Mutex, MutexLockFuture, MutexGuard}; | 
|  | 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}; | 
| 10 | 11 | 
 | 
| 11 |  | -#[cfg(any(feature = "bilock", feature = "sink", feature = "io"))] | 
| 12 |  | -#[cfg_attr(docsrs, doc(cfg(feature = "bilock")))] | 
| 13 |  | -#[cfg_attr(not(feature = "bilock"), allow(unreachable_pub))] | 
| 14 |  | -mod bilock; | 
| 15 |  | -#[cfg(feature = "bilock")] | 
| 16 |  | -#[cfg_attr(docsrs, doc(cfg(feature = "bilock")))] | 
| 17 |  | -pub use self::bilock::{BiLock, BiLockAcquire, BiLockGuard, ReuniteError}; | 
| 18 |  | -#[cfg(any(feature = "sink", feature = "io"))] | 
| 19 |  | -#[cfg(not(feature = "bilock"))] | 
| 20 |  | -pub(crate) use self::bilock::BiLock; | 
|  | 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 | +} | 
0 commit comments