Skip to main content

Module event_flags

Module event_flags 

Source
Expand description

Coalesced condition notification for an ISR-to-task handoff.

EventFlags records whether each of exactly 32 payload-free conditions occurred since the preceding take. The producer raises an EventMask with one atomic fetch_or; the consumer takes every pending condition with one atomic swap(0). Repeated raises of the same condition may coalesce, and conditions carry neither multiplicity nor ordering.

A raise uses Release ordering and a take uses Acquire ordering. Therefore, memory actions sequenced before a raise happen-before memory actions sequenced after a take that observes that raise. The flags publish the fact that application state is ready; they do not carry that state themselves.

The handles are deliberately sole-role Send + !Sync values. An &self hot-path receiver does not make a handle shareable: move each handle into the one execution context that owns its role.

Structs§

Consumer
The sole taking handle for an EventFlags value.
EventFlags
A coalescing SPSC set of 32 payload-free conditions.
EventMask
A set of pending EventFlags conditions.
Producer
The sole raising handle for an EventFlags value.