This is a set of backends for pw_sync based on embOS v4.
Critical Section Lock Primitives¶
Mutex & TimedMutex¶
The embOS v4 backend for the Mutex and TimedMutex use
OS_RSEMA as the
underlying type. It is created using
OS_CreateRSema as part of the
constructors and cleaned up using
OS_DeleteRSema in the destructors.
The embOS v4 backend for InterruptSpinLock is backed by a
bool which permits
these objects to detect accidental recursive locking.
This object uses
OS_DecRI to mask interrupts which enables
the critical section. In addition,
OS_ResumeAllSuspendedTasks are used to to prevent accidental thread context
switches while the InterruptSpinLock is locked.
ThreadNotification & TimedThreadNotification¶
The native embOS v4 implementation of its semaphores (
OS_CSEMA) is very
efficient, ergo we recommend using the binary semaphore backends for
BinarySemaphore & CountingSemaphore¶
The embOS v4 backends for the BinarySemaphore and CountingSemaphore use
OS_CSEMA as the underlying type. It is created using
part of the constructor and cleaned up using
OS_DeleteCSema in the