Skip to main content

Module sync

Module sync 

Source
Expand description

Synchronization primitives for oveRTOS.

Provides RAII wrappers for mutexes, recursive mutexes, semaphores, events, and condition variables. All types implement Send + Sync and work in both heap and zero-heap modes.

Structs§

CondVar
CondVarStorage
Condition variable. Pair with Mutex<T> to wait on state changes.
Event
Binary event (signal/wait).
EventStorage
Caller-owned storage for an Event in zero-heap mode (see MutexStorage).
Mutex
Mutex protecting a value of type T. std::sync::Mutex<T> / parking_lot::Mutex<T> analog.
MutexGuard
RAII guard that unlocks a Mutex<T> when dropped.
MutexStorage
Caller-owned backing storage for a Mutex in zero-heap mode. Declare it in a static and hand &STORAGE to Mutex::create; in heap mode the storage is ignored. Mirrors [crate::ThreadStorage] — const fn new() makes it usable from a static, and the bytes are only ever handed to C as a raw pointer (the kernel owns the object’s synchronisation).
RecursiveMutex
RAII wrapper around a recursive mutex.
RecursiveMutexGuard
RAII guard that unlocks a RecursiveMutex when dropped.
RecursiveMutexStorage
Caller-owned storage for a RecursiveMutex in zero-heap mode (see MutexStorage).
Semaphore
Counting semaphore.
SemaphoreStorage
Caller-owned backing storage for a Semaphore in zero-heap mode. See MutexStorage for the pattern; pass &STORAGE to Semaphore::create.
SpinMutex
IRQ-locking mutex for very short critical sections.
SpinMutexGuard
RAII guard that releases the SpinMutex when dropped.
WaitTimeoutResult
Result of a Condvar::wait_for / wait_until call indicating whether the wait elapsed without being signalled.