pub struct IrqMutexGuard<'g, T> {
mutex: &'g IrqMutex<T>,
rflags: RFlags,
}Expand description
RAII guard for IrqMutex; releases the lock and restores the interrupt flag on drop.
Fields§
§mutex: &'g IrqMutex<T>§rflags: RFlagsRFLAGS captured before interrupts were disabled; its IF bit decides whether to re-enable on drop.
Implementations§
Source§impl<'g, T> IrqMutexGuard<'g, T>
impl<'g, T> IrqMutexGuard<'g, T>
Sourcepub fn new(mutex: &'g IrqMutex<T>, rflags: RFlags) -> IrqMutexGuard<'g, T>
pub fn new(mutex: &'g IrqMutex<T>, rflags: RFlags) -> IrqMutexGuard<'g, T>
Construct a guard associated with mutex, saving rflags for later restore.
Trait Implementations§
Source§impl<'g, T> Deref for IrqMutexGuard<'g, T>
impl<'g, T> Deref for IrqMutexGuard<'g, T>
Source§impl<'g, T> DerefMut for IrqMutexGuard<'g, T>
impl<'g, T> DerefMut for IrqMutexGuard<'g, T>
Source§impl<'g, T> Drop for IrqMutexGuard<'g, T>
impl<'g, T> Drop for IrqMutexGuard<'g, T>
Auto Trait Implementations§
impl<'g, T> !RefUnwindSafe for IrqMutexGuard<'g, T>
impl<'g, T> !UnwindSafe for IrqMutexGuard<'g, T>
impl<'g, T> Freeze for IrqMutexGuard<'g, T>
impl<'g, T> Send for IrqMutexGuard<'g, T>where
T: Send,
impl<'g, T> Sync for IrqMutexGuard<'g, T>where
T: Send,
impl<'g, T> Unpin for IrqMutexGuard<'g, T>
impl<'g, T> UnsafeUnpin for IrqMutexGuard<'g, T>
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more