pub struct BandWaiter { /* private fields */ }Expand description
A band worker’s
wake object and the slots it answers for. The transport’s arrival path
reads it without the executor’s lock, so it is 'static and its fields
are atomics or fixed at construction; it is linked into the executor’s
arrival routing by Executor::attach_band_worker
and never unlinked.
Implementations§
Source§impl BandWaiter
phase-509 P9b item 4 (RFC-0108 “As built in P9b”) – a band worker’s wake
object over the platform’s (nros_platform_wake_*): what a level runner
gives each spawned level.
impl BandWaiter
phase-509 P9b item 4 (RFC-0108 “As built in P9b”) – a band worker’s wake
object over the platform’s (nros_platform_wake_*): what a level runner
gives each spawned level.
Sourcepub fn platform() -> Option<&'static BandWaiter>
pub fn platform() -> Option<&'static BandWaiter>
A waiter over a new platform wake object, leaked with it: one per
level, for the image’s life. None when the platform links no wake
primitive; the level then polls.
Source§impl BandWaiter
impl BandWaiter
Sourcepub const unsafe fn new(
wake: unsafe extern "C" fn(*mut c_void),
wake_from_isr: unsafe extern "C" fn(*mut c_void),
wait: unsafe extern "C" fn(*mut c_void, u64) -> i32,
ctx: *mut c_void,
) -> BandWaiter
pub const unsafe fn new( wake: unsafe extern "C" fn(*mut c_void), wake_from_isr: unsafe extern "C" fn(*mut c_void), wait: unsafe extern "C" fn(*mut c_void, u64) -> i32, ctx: *mut c_void, ) -> BandWaiter
A waiter over the port’s wake object at ctx.
Every waiter states its interrupt-safe wake: a band an
interrupt cannot wake would wait out its park instead. Pass wake
again where the port’s thread wake is already interrupt-safe.
§Safety
wake and wait are callable from any thread with ctx, and
wake_from_isr from an interrupt handler (on POSIX, a signal
handler) with it. ctx outlives every executor the waiter is attached
to.