pub struct Producer<'a> { /* private fields */ }Expand description
The sole raising handle for an EventFlags value.
This handle is Send + !Sync: it may move into an ISR or another execution
context, but it may not be shared between contexts.
use ph_eventing::event_flags::Producer;
fn assert_sync<T: Sync>() {}
assert_sync::<Producer<'static>>();Implementations§
Source§impl Producer<'_>
impl Producer<'_>
Sourcepub fn raise(&self, mask: EventMask)
pub fn raise(&self, mask: EventMask)
Raise every condition in mask.
The operation is exactly one source-level atomic fetch_or: no
algorithmic retry loop, and it never waits, allocates, calls user
code, or panics. How the single RMW is realised is per-ISA — a lone
amoor.w on RISC-V, a gated four-instruction PRIMASK critical
section on Cortex-M0, and an LDREX/STREX pair on exclusive-monitor
ARM, where a lost reservation (an intervening interrupt, or the
concurrent take’s swap) repeats the pair. That hardware retry is
bounded by contention on the one shared word, not by anything this
code does; the uncontended cost is the measured row. A concurrent
take observes this raise in its own snapshot or leaves it pending
for the following take.