Struct cortex_m::interrupt::Mutex [−][src]
pub struct Mutex<T> { /* fields omitted */ }A "mutex" based on critical sections
Methods
impl<T> Mutex<T>[src]
impl<T> Mutex<T>impl<T> Mutex<T>[src]
impl<T> Mutex<T>pub fn lock<F, R>(&self, f: F) -> R where
F: FnOnce(&mut T) -> R, [src]
pub fn lock<F, R>(&self, f: F) -> R where
F: FnOnce(&mut T) -> R, Gets access to the inner data
NOTE this prevents interrupts handlers from running thus gaining exclusive access to the processor