Skip to main content

IrqWaitToken

Struct IrqWaitToken 

Source
pub struct IrqWaitToken<'cell> { /* private fields */ }
Expand description

Published identity for one IRQ waiter registration generation.

A token remains attached while its cell owns the waiter. Once is_attached becomes false, the task may avoid or abort its park. It must then be consumed by detach before the backing registration or wake payload is reused.

Implementations§

Source§

impl IrqWaitToken<'_>

Source

pub const fn generation(&self) -> u64

Returns this one-shot registration generation.

Source

pub fn is_attached(&self) -> bool

Returns whether the cell still owns this generation.

Once this becomes false, a waiter may safely avoid sleeping. It does not imply that an IRQ notifier has finished reading the wake payload; only the drain returned by Self::detach publishes that guarantee.

Source

pub fn detach(self) -> IrqWaitDrain

Stops publication of this generation and enters its drain lifetime.

This operation never waits. If a notifier already removed the waiter, the returned drain observes that notifier until it publishes its claim release; IrqWaitDrain::finish performs that bounded wait. Hard-IRQ teardown must defer the drain to a task-context worker.

Trait Implementations§

Source§

impl Debug for IrqWaitToken<'_>

Source§

fn fmt(&self, formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'cell> !RefUnwindSafe for IrqWaitToken<'cell>

§

impl<'cell> !UnwindSafe for IrqWaitToken<'cell>

§

impl<'cell> Freeze for IrqWaitToken<'cell>

§

impl<'cell> Send for IrqWaitToken<'cell>

§

impl<'cell> Sync for IrqWaitToken<'cell>

§

impl<'cell> Unpin for IrqWaitToken<'cell>

§

impl<'cell> UnsafeUnpin for IrqWaitToken<'cell>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Error = !

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.