[][src]Enum r3::kernel::MutexProtocol

pub enum MutexProtocol {
    None,
    Ceiling(usize),
}

Specifies the locking protocol to be followed by a mutex.

Relation to Other Specifications: The operating systems and operating system specifications providing an interface for specifying a mutex protocol include (but are not limited to) the following: POSIX (pthread_mutexattr_setprotocol and PTHREAD_PRIO_PROTECT, etc.), RTEMS Classic API (RTEMS_PRIORITY_CEILING, etc.), and μITRON4.0 (TA_CEILING, etc.).

Rationale: When this enumerate type was added, the plan was to only support the priority ceiling protocol, so having a method CfgMutexBuilder::ceiling_priority taking a priority ceiling value would have been simpler. Nevertheless, it was decided to use this enumerate type to accomodate other protocols in the future and to allow specifying protocol-specific parameters.

Variants

None

Locking the mutex does not affect the priority of the owning task.

Ceiling(usize)

Locking the mutex raises the effective priority of the owning task to the mutex's priority ceiling according to the immediate priority ceiling protocol. The inner value specifies the priority ceiling.

The value must be in range 0..num_task_priority_levels.

Trait Implementations

impl Clone for MutexProtocol[src]

impl Copy for MutexProtocol[src]

impl Debug for MutexProtocol[src]

impl Eq for MutexProtocol[src]

impl PartialEq<MutexProtocol> for MutexProtocol[src]

impl StructuralEq for MutexProtocol[src]

impl StructuralPartialEq for MutexProtocol[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.