![]() |
SuperTinyKernel™ RTOS 1.05.3
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
|
Synchronization primitives for task coordination and resource protection. More...
Classes | |
| class | ScopedCriticalSection |
| RAII-style low-level synchronization primitive for atomic code execution. Used as building brick for other stk::sync classes, consider using hw::CriticalSection::ScopedLock implementation instead. More... | |
| class | ConditionVariable |
| Condition Variable primitive for signaling between tasks based on specific predicates. More... | |
| class | Event |
| Binary synchronization event (signaled / non-signaled) primitive. More... | |
| class | EventFlags |
| 32-bit event flags group for multi-flag synchronization between tasks. More... | |
| class | Mutex |
| Recursive mutex primitive that allows the same thread to acquire the lock multiple times. More... | |
| class | Pipe |
| Thread-safe FIFO communication pipe for inter-task data passing. More... | |
| class | RWMutex |
| Reader-Writer Lock synchronization primitive for non-recursive shared and exclusive access. More... | |
| class | Semaphore |
| Counting semaphore primitive for resource management and signaling. More... | |
| class | SpinLock |
| Recursive spinlock. More... | |
Synchronization primitives for task coordination and resource protection.
Special care must be taken when calling synchronization methods from within an Interrupt Service Routine (ISR).
As a general rule, methods that can cause the caller to block or sleep are STRICTLY FORBIDDEN in ISRs.
| Primitive | ISR Safe Methods |
|---|---|
| Event | Set(), Pulse(), Reset(), TryWait() |
| EventFlags | Set(), Clear(), Get(), TryWait(), Wait(NO_WAIT) |
| Semaphore | Signal(), TryWait() |
| SpinLock | None |
| Mutex | None |
| RWMutex | None |
| ConditionVariable | NotifyOne(), NotifyAll(), Wait(NO_WAIT) |
| Pipe | Write(NO_WAIT), WriteBulk(NO_WAIT), TryWrite(), TryWriteBulk(), Read(NO_WAIT), ReadBulk(NO_WAIT), TryRead(), TryReadBulk() |
NOTE:
WARNING: