pub struct IrqSafeMutex<T: ?Sized>(/* private fields */);Expand description
A mutex that disables preemption and local interrupts while held.
Implementations§
Source§impl<T> IrqSafeMutex<T>
impl<T> IrqSafeMutex<T>
Sourcepub fn lock(&self) -> IrqSafeMutexGuard<'_, T>
pub fn lock(&self) -> IrqSafeMutexGuard<'_, T>
Acquires the lock after saving and disabling local interrupts.
Sourcepub fn try_lock(&self) -> Option<IrqSafeMutexGuard<'_, T>>
pub fn try_lock(&self) -> Option<IrqSafeMutexGuard<'_, T>>
Attempts to acquire the lock with IRQ-save semantics.
Trait Implementations§
Source§impl<T: Debug> Debug for IrqSafeMutex<T>
impl<T: Debug> Debug for IrqSafeMutex<T>
Auto Trait Implementations§
impl<T> !Freeze for IrqSafeMutex<T>
impl<T> !RefUnwindSafe for IrqSafeMutex<T>
impl<T> Send for IrqSafeMutex<T>
impl<T> Sync for IrqSafeMutex<T>
impl<T> Unpin for IrqSafeMutex<T>
impl<T> UnsafeUnpin for IrqSafeMutex<T>
impl<T> UnwindSafe for IrqSafeMutex<T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more