1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#![no_std]
#![warn(missing_docs)]
#![cfg_attr(feature = "cargo-clippy", allow(clippy::style))]
#[cfg(not(debug_assertions))]
macro_rules! unreach {
() => ({
unsafe {
core::hint::unreachable_unchecked();
}
})
}
#[cfg(debug_assertions)]
macro_rules! unreach {
() => ({
unreachable!()
})
}
mod sem;
pub use sem::{Sem, Semaphore, SemaphoreGuard};
mod once;
pub use once::Once;
pub mod mutex;
pub use mutex::Mutex;
pub type SemMutex = mutex::SemMutex<Sem>;