sync_linux_no_libc/sync/mod.rs
1//! Linux no_libc synchronization primitives.
2//!
3//! ## Higher-level synchronization objects
4//!
5//! Sync-linux-no-libc currently reimplements the following
6//! [`std::sync`](https://doc.rust-lang.org/std/sync/index.html)
7//! synchronization objects:
8//!
9//! - [`Barrier`]: Ensures multiple threads will wait for each other
10//! to reach a point in the program, before continuing execution all
11//! together.
12//!
13//! - [`Condvar`]: Condition Variable, providing the ability to block
14//! a thread while waiting for an event to occur.
15//!
16//! - [`Mutex`]: Mutual Exclusion mechanism, which ensures that at
17//! most one thread at a time is able to access some data. Unlike the
18//! [std equivalent](https://doc.rust-lang.org/std/sync/struct.Mutex.html),
19//! it does not have a poison mechanism.
20//!
21//! [`Barrier`]: Barrier
22//! [`Condvar`]: Condvar
23//! [`Mutex`]: Mutex
24
25mod mutex;
26mod barrier;
27mod condvar;
28
29pub use barrier::Barrier;
30pub use barrier::BarrierWaitResult;
31pub use condvar::Condvar;
32pub use condvar::WaitTimeoutResult;
33pub use mutex::Mutex;
34pub use mutex::MutexGuard;
35pub use mutex::TryLockError;
36pub use mutex::TryLockResult;