Skip to main content Skip to main content
Pigweed's logo Pigweed
code_xml
  1. Home
  2. Reference
  3. Rust
  4. pw_kernel
  5. kernel
  6. InterruptGuard

InterruptGuard

Struct InterruptGuard 

Source
pub struct InterruptGuard<K: Kernel> {
    kernel: K,
    preempt_guard: Option<PreemptDisableGuard<K>>,
    from_userspace: bool,
    reason: RescheduleReason,
}

Fields§

§kernel: K§preempt_guard: Option<PreemptDisableGuard<K>>§from_userspace: bool§reason: RescheduleReason

Implementations§

Source§

impl<K: Kernel> InterruptGuard<K>

Source

pub fn new(kernel: K, from_userspace: bool) -> Self

Source

pub fn set_reschedule_reason(&mut self, reason: RescheduleReason)

Source

pub fn from_userspace(&self) -> bool

Trait Implementations§

Source§

impl<K: Kernel> Drop for InterruptGuard<K>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
§

fn pin_drop(self: Pin<&mut Self>)

🔬This is a nightly-only experimental API. (pin_ergonomics)
Execute the destructor for this type, but different to Drop::drop, it requires self to be pinned. Read more

Auto Trait Implementations§

§

impl<K> Forget for InterruptGuard<K>

§

impl<K> Freeze for InterruptGuard<K>
where K: Freeze, Option<PreemptDisableGuard<K>>: Freeze,

§

impl<K> Move for InterruptGuard<K>

§

impl<K> RefUnwindSafe for InterruptGuard<K>
where K: RefUnwindSafe, Option<PreemptDisableGuard<K>>: RefUnwindSafe,

§

impl<K> Send for InterruptGuard<K>
where K: Send, Option<PreemptDisableGuard<K>>: Send,

§

impl<K> Sync for InterruptGuard<K>
where Option<PreemptDisableGuard<K>>: Sync,

§

impl<K> Unpin for InterruptGuard<K>
where K: Unpin, Option<PreemptDisableGuard<K>>: Unpin,

§

impl<K> UnsafeUnpin for InterruptGuard<K>
where K: UnsafeUnpin, Option<PreemptDisableGuard<K>>: UnsafeUnpin,

§

impl<K> UnwindSafe for InterruptGuard<K>
where K: UnwindSafe, Option<PreemptDisableGuard<K>>: UnwindSafe,

Blanket Implementations§

§

impl<T> Any for T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T, U> CastInto<U> for T
where U: CastFrom<T>,

Source§

fn cast_into(self) -> U

§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = !

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.