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<'_>
impl IrqWaitToken<'_>
Sourcepub const fn generation(&self) -> u64
pub const fn generation(&self) -> u64
Returns this one-shot registration generation.
Sourcepub fn is_attached(&self) -> bool
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.
Sourcepub fn detach(self) -> IrqWaitDrain
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.