SuperTinyKernel™ RTOS 1.06.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
FrtosSemaphore Struct Reference
Collaboration diagram for FrtosSemaphore:

Public Member Functions

 FrtosSemaphore (SemKind kind, uint16_t initial, uint16_t max_count)
 ~FrtosSemaphore ()

Public Attributes

SemKind m_kind
bool m_cb_owned
stk::sync::Semaphorem_sem
stk::sync::Mutexm_mtx
FrtosQueueSetm_set
 non-owning ptr to the queue set this member belongs to (nullptr if none)

Detailed Description

Definition at line 613 of file freertos_stk.cpp.

Constructor & Destructor Documentation

◆ FrtosSemaphore()

FrtosSemaphore::FrtosSemaphore ( SemKind kind,
uint16_t initial,
uint16_t max_count )
inlineexplicit

Definition at line 615 of file freertos_stk.cpp.

616 : m_kind(kind), m_cb_owned(true),
617 m_sem(nullptr)
618#if configUSE_MUTEXES
619 , m_mtx(nullptr)
620#endif
621 #if configUSE_QUEUE_SETS
622 , m_set(nullptr)
623 #endif
624 {
625 if (kind == SemKind::Counting)
626 m_sem = ObjAlloc<stk::sync::Semaphore>(initial, max_count);
627#if configUSE_MUTEXES
628 else
630#endif
631 }
static T * ObjAlloc(Args &&...args)
@ Counting
Binary or counting semaphore (backed by stk::sync::Semaphore).
stk::sync::Mutex * m_mtx
stk::sync::Semaphore * m_sem
FrtosQueueSet * m_set
non-owning ptr to the queue set this member belongs to (nullptr if none)

References configUSE_MUTEXES, configUSE_QUEUE_SETS, Counting, m_cb_owned, m_kind, m_mtx, m_sem, m_set, and ObjAlloc().

Here is the call graph for this function:

◆ ~FrtosSemaphore()

FrtosSemaphore::~FrtosSemaphore ( )
inline

Definition at line 633 of file freertos_stk.cpp.

634 {
636#if configUSE_MUTEXES
638#endif
639 }
static void ObjFreeRaw(T *obj)

References m_mtx, m_sem, and ObjFreeRaw().

Referenced by xSemaphoreCreateBinaryStatic(), xSemaphoreCreateCountingStatic(), and xSemaphoreCreateMutexStatic().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ m_cb_owned

bool FrtosSemaphore::m_cb_owned

◆ m_kind

◆ m_mtx

◆ m_sem

◆ m_set

FrtosQueueSet* FrtosSemaphore::m_set

non-owning ptr to the queue set this member belongs to (nullptr if none)

Definition at line 649 of file freertos_stk.cpp.

Referenced by FrtosSemaphore(), xQueueAddToSet(), and xQueueRemoveFromSet().


The documentation for this struct was generated from the following file: