Skip to main content

Module sync

Module sync 

Source
Expand description

Async synchronization primitives.

Re-exports§

pub use channel::Channel;
pub use channel::Receiver;
pub use channel::Sender;
pub use once::Once;
pub use semaphore::Semaphore;
pub use signal::Signal;

Modules§

atomic
Atomic shim: loom::sync::atomic under permutation testing, otherwise core::sync::atomic — or, on a target with no native RMW atomics (see the atomics-polyfill feature), portable_atomic instead (plan.md §1.3).
channel
Static SPSC (Single-Producer Single-Consumer) channel.
once
A minimal no_std Once cell: written exactly once (at boot), read-only afterwards. Used for the Channel::split-once pattern (plan.md [B8]): the sender/receiver halves of a static channel are stored here once at boot and borrowed by tasks for the lifetime of the program.
semaphore
Async counting semaphore.
signal
A one-shot, latching wake-up handoff between an external context (an ISR, another hart, another task) and exactly one waiting task.