pub struct IrqDisabled;Expand description
Guardian that saves RFLAGS and disables IRQs before the lock is acquired.
Equivalent to Linux spin_lock_irqsave. Use this for data that may be
accessed from interrupt handlers or from multiple CPUs.
Trait Implementations§
Source§impl Guardian for IrqDisabled
impl Guardian for IrqDisabled
Source§type Token = IrqDisabledToken
type Token = IrqDisabledToken
Token type that proves the CPU is in the right protection mode.
Source§fn enter() -> GuardianState<Self::Token>
fn enter() -> GuardianState<Self::Token>
Enter the protected mode and return the token.
Source§fn exit(state: GuardianState<Self::Token>)
fn exit(state: GuardianState<Self::Token>)
Exit the protected mode, restoring the previous CPU state.
Auto Trait Implementations§
impl Freeze for IrqDisabled
impl RefUnwindSafe for IrqDisabled
impl Send for IrqDisabled
impl Sync for IrqDisabled
impl Unpin for IrqDisabled
impl UnsafeUnpin for IrqDisabled
impl UnwindSafe for IrqDisabled
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more