Struct freertos_rs::Semaphore
[−]
[src]
pub struct Semaphore { /* fields omitted */ }
A counting or binary semaphore
Methods
impl Semaphore
[src]
fn new_binary() -> Result<Semaphore, FreeRtosError>
Create a new binary semaphore
fn new_counting(max: u32, initial: u32) -> Result<Semaphore, FreeRtosError>
Create a new counting semaphore
fn lock(&self, max_wait: Duration) -> Result<SemaphoreGuard, FreeRtosError>
Lock this semaphore