pub struct PiMutex { /* private fields */ }Expand description
Priority Inheritance Mutex
Prevents priority inversion by temporarily boosting the lock holder’s priority to that of the highest-priority waiter. When the lock is released, the original priority is restored.
Implementations§
Source§impl PiMutex
impl PiMutex
Sourcepub fn lock(&self)
pub fn lock(&self)
Acquire the mutex, boosting the holder’s priority if necessary.
If the lock is held by a lower-priority task, the holder’s effective priority is boosted to prevent priority inversion.
Sourcepub fn unlock(&self) -> Result<(), KernelError>
pub fn unlock(&self) -> Result<(), KernelError>
Release the mutex and restore the original priority.
Wakes the highest-priority waiter.