pub struct PollSet(/* private fields */);Expand description
A data structure for waking up tasks that are waiting for I/O events.
Implementations§
Source§impl PollSet
impl PollSet
Sourcepub unsafe fn register(&self, waker: &Waker, interests: IoEvents)
pub unsafe fn register(&self, waker: &Waker, interests: IoEvents)
Registers a waker for the requested I/O events.
§Safety
This method is task/deferred-context only. Callers must not invoke it from hard IRQ, NMI, or trap callbacks, and must not hold locks that may be re-entered by the registered waker or by poll wakeup paths.
Sourcepub unsafe fn wake(&self, ready: IoEvents) -> usize
pub unsafe fn wake(&self, ready: IoEvents) -> usize
Wakes up registered wakers whose interests intersect ready.
§Safety
This method is task/deferred-context only. Callers must not invoke it
from hard IRQ, NMI, or trap callbacks. The readiness state represented
by ready must be published before this method is called, and callers
must not hold locks that may be re-entered by waker execution or poll
wakeup paths.
Sourcepub fn wake_from_irq(&self, ready: IoEvents) -> usize
pub fn wake_from_irq(&self, ready: IoEvents) -> usize
Wakes up registered wakers whose interests intersect ready from IRQ context.
Unlike wake, this does not allocate a replacement
waiter buffer. It drains the already-initialized entries in place, so
device IRQ handlers can acknowledge the device and then wake matching
poll waiters without allocating in hard IRQ context.