Trait rtfm::Mutex

source ·
pub unsafe trait Mutex {
    type Data: Send;

    fn lock<R, F>(&mut self, f: F) -> R
    where
        F: FnOnce(&mut Self::Data) -> R
, { ... } }
Expand description

Memory safe access to shared resources

In RTFM, locks are implemented as critical sections that prevent other tasks from starting. These critical sections are implemented by temporarily increasing the dynamic priority (see BASEPRI) of the current context.

Required Associated Types

Data protected by the mutex

Provided Methods

Creates a critical section and grants temporary access to the protected data

Implementors