pub struct IrqWaitCell { /* private fields */ }Expand description
Pending-bit plus single-waiter hard-IRQ event cell.
Implementations§
Source§impl IrqWaitCell
impl IrqWaitCell
Sourcepub fn register<'cell>(
&'cell self,
registration: &IrqWaitRegistration,
) -> IrqRegisterResult<'cell>
pub fn register<'cell>( &'cell self, registration: &IrqWaitRegistration, ) -> IrqRegisterResult<'cell>
Registers one stable waiter, consuming an earlier IRQ when present.
Sourcepub fn notify(&self) -> IrqNotifyResult
pub fn notify(&self) -> IrqNotifyResult
Wakes the sole registered thread or publishes one coalesced pending bit.
This operation performs a bounded number of atomics and at most one trusted direct wake. After repeated contention, it atomically installs the sticky pending state and may retain one harmless extra service pass after waking the displaced waiter. It never scans a wait queue or allocates.
The whole claim-to-release section runs non-preemptible, mirroring
Linux’s irq_work execution boundary: hard IRQ context is inherently
non-preemptible, and ordinary task context enters a preemption scope,
matching how irq_workd disables migration around the claim. This
bounds how long a draining waiter can observe a Notifying claim.
Sourcepub fn is_pending(&self) -> bool
pub fn is_pending(&self) -> bool
Reports whether an IRQ is coalesced for the next registration.