Struct freertos_rs::Mutex
[−]
[src]
pub struct Mutex<T: ?Sized> { /* fields omitted */ }
Mutual exclusion access to a contained value. Can be recursive - the current owner of a lock can re-lock it.
Methods
impl<T> Mutex<T>
[src]
fn new(t: T) -> Result<Mutex<T>, FreeRtosError>
Create a new mutex with the given inner value
fn new_recursive(t: T) -> Result<Mutex<T>, FreeRtosError>
Create a new recursive mutex with the given inner value
fn lock(&self, max_wait: Duration) -> Result<MutexGuard<T>, FreeRtosError>
Try to obtain a lock and mutable access to our inner value
fn into_inner(self) -> T
Consume the mutex and return its inner value