]>
Commit | Line | Data |
---|---|---|
83c7162d XL |
1 | // Copyright 2016 Amanieu d'Antras |
2 | // | |
3 | // Licensed under the Apache License, Version 2.0, <LICENSE-APACHE or | |
4 | // http://apache.org/licenses/LICENSE-2.0> or the MIT license <LICENSE-MIT or | |
5 | // http://opensource.org/licenses/MIT>, at your option. This file may not be | |
6 | // copied, modified, or distributed except according to those terms. | |
7 | ||
8 | //! This library provides implementations of `Mutex`, `RwLock`, `Condvar` and | |
9 | //! `Once` that are smaller, faster and more flexible than those in the Rust | |
10 | //! standard library. It also provides a `ReentrantMutex` type. | |
11 | ||
12 | #![warn(missing_docs)] | |
e1599b0c | 13 | #![warn(rust_2018_idioms)] |
83c7162d | 14 | #![cfg_attr(feature = "nightly", feature(asm))] |
83c7162d | 15 | |
b7449926 | 16 | mod condvar; |
83c7162d | 17 | mod elision; |
b7449926 XL |
18 | mod mutex; |
19 | mod once; | |
83c7162d | 20 | mod raw_mutex; |
83c7162d | 21 | mod raw_rwlock; |
83c7162d XL |
22 | mod remutex; |
23 | mod rwlock; | |
b7449926 | 24 | mod util; |
83c7162d XL |
25 | |
26 | #[cfg(feature = "deadlock_detection")] | |
27 | pub mod deadlock; | |
28 | #[cfg(not(feature = "deadlock_detection"))] | |
29 | mod deadlock; | |
30 | ||
e1599b0c XL |
31 | pub use ::lock_api as lock_api; |
32 | pub use self::condvar::{Condvar, WaitTimeoutResult}; | |
33 | pub use self::mutex::{MappedMutexGuard, Mutex, MutexGuard}; | |
34 | pub use self::once::{Once, OnceState}; | |
35 | pub use self::raw_mutex::RawMutex; | |
36 | pub use self::raw_rwlock::RawRwLock; | |
37 | pub use self::remutex::{ | |
38 | MappedReentrantMutexGuard, RawThreadId, ReentrantMutex, ReentrantMutexGuard, | |
39 | }; | |
40 | pub use self::rwlock::{ | |
b7449926 XL |
41 | MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard, |
42 | RwLockUpgradableReadGuard, RwLockWriteGuard, | |
43 | }; |