Struct cortex_m::interrupt::Mutex
[−]
[src]
pub struct Mutex<T> { /* fields omitted */ }
A "mutex" based on critical sections
Methods
impl<T> Mutex<T>
[src]
const fn new(value: T) -> Self
Creates a new mutex
impl<T> Mutex<T>
[src]
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