SuperTinyKernel™ RTOS 1.08.x
Lightweight, high-performance, deterministic, bare-metal C++ RTOS for resource-constrained embedded systems. MIT Open Source License.
Loading...
Searching...
No Matches
stk::sync::EventFlags Class Referencefinal

32-bit event flags group for multi-flag synchronization between tasks. More...

#include <stk_sync_eventflags.h>

Inheritance diagram for stk::sync::EventFlags:
Collaboration diagram for stk::sync::EventFlags:

Public Member Functions

 EventFlags (uint32_t initial_flags=0U)
 Constructor.
 ~EventFlags ()=default
 Destructor.
uint32_t Set (uint32_t flags)
 Set one or more flags.
uint32_t Clear (uint32_t flags)
 Clear one or more flags.
uint32_t Get () const
 Read the current flags word without modifying it.
uint32_t Wait (uint32_t flags, uint32_t options=OPT_WAIT_ANY, Timeout timeout_ticks=WAIT_INFINITE)
 Wait for one or more flags to be set.
uint32_t TryWait (uint32_t flags, uint32_t options=OPT_WAIT_ANY)
 Non-blocking flag poll.
const IWaitObject::ListHeadType & GetWaitList () const
 Get list of tasks blocked on this object.
TId GetFirstWaiterTid () const
 Get id of the task which is first in the wait list (FIFO order), i.e. the one that WakeOne() would wake next.
void SetTraceName (const char *name)
 Set name.
const char * GetTraceName () const
 Get name.

Static Public Member Functions

static bool IsError (uint32_t result)
 Checks if a return value from Set(), Clear(), or Wait() is an error.

Static Public Attributes

static const uint32_t OPT_WAIT_ANY = 0x00000000U
 Wait for ANY of the specified flags to be set (OR semantics, default).
static const uint32_t OPT_WAIT_ALL = 0x00000001U
 Wait for ALL of the specified flags to be set simultaneously (AND semantics).
static const uint32_t OPT_NO_CLEAR = 0x00000002U
 Do not clear matched flags after a successful wait.
static const uint32_t ERROR_PARAMETER = 0x80000001U
 Return sentinel: invalid flags argument (bit 31 set).
static const uint32_t ERROR_TIMEOUT = 0x80000002U
 Return sentinel: wait timed out before the flags condition was met.
static const uint32_t ERROR_ISR = 0x80000004U
 Return sentinel: called from an ISR with a blocking timeout.
static const uint32_t ERROR_CANCELED = 0x80000008U
 Return sentinel: the wait was cancelled via IKernel::CancelTaskWait() before the flag condition was met (independent of the deadline).
static const uint32_t ERROR_FAIL = 0x80000010U
 Return sentinel: the kernel rejected the wait (IKernelService::Wait() returned WAIT_RESULT_FAIL, e.g. KERNEL_SYNC mode is not enabled).
static const uint32_t ERROR_MASK = 0x80000000U
 Reserved error mask. Any return value with bit 31 set is an error.

Private Member Functions

 EventFlags (const EventFlags &)=delete
EventFlags & operator= (const EventFlags &)=delete
bool IsSatisfied (uint32_t flags, uint32_t options) const

Private Attributes

volatile uint32_t m_flags
 32-bit flags word (bit 31 is reserved for errors)
ConditionVariable m_cv
 woken by Set() to re-evaluate waiting tasks

Detailed Description

32-bit event flags group for multi-flag synchronization between tasks.

EventFlags maintains a 32-bit word where each bit represents an independent boolean event. Tasks can set or clear any combination of flags, and wait for any subset to become set — either requiring all requested flags (AND semantics) or any one of them (OR semantics).

Unlike Event, which models a single binary signal, EventFlags allows fine-grained coordination across up to 32 independent conditions in a single object.

Note
Wait semantics: the caller selects the mode via the options parameter using WAIT_ANY (default) or WAIT_ALL.
Auto-clear: by default the matched flags are atomically cleared upon a successful Wait(). Pass NO_CLEAR to suppress this.
Direct Handover: Set() notifies all waiters so that every task re-evaluates its own predicate after waking. Each waiter clears only the flags it matched, so concurrent waiters with disjoint flag masks do not interfere with each other.
Maximum flag bit index is 30 (bits 0..30). Bit 31 is reserved for future error reporting and must never be set by the caller.
// Example: sensor fusion — wait for GPS and IMU data to both arrive
stk::sync::EventFlags g_SensorFlags;
static const uint32_t FLAG_GPS = (1U << 0);
static const uint32_t FLAG_IMU = (1U << 1);
void ISR_GPS() {
g_SensorFlags.Set(FLAG_GPS); // ISR-safe
}
void ISR_IMU() {
g_SensorFlags.Set(FLAG_IMU); // ISR-safe
}
void Task_Fusion() {
// block until BOTH flags are set simultaneously; clears them on return
uint32_t raised = g_SensorFlags.Wait(FLAG_GPS | FLAG_IMU,
EventFlags::WAIT_ALL, 5000);
if (raised & EventFlags::ERROR_TIMEOUT) {
// handle timeout
} else {
// process fused sensor data
}
}
32-bit event flags group for multi-flag synchronization between tasks.
uint32_t Wait(uint32_t flags, uint32_t options=OPT_WAIT_ANY, Timeout timeout_ticks=WAIT_INFINITE)
Wait for one or more flags to be set.
static const uint32_t ERROR_TIMEOUT
Return sentinel: wait timed out before the flags condition was met.
uint32_t Set(uint32_t flags)
Set one or more flags.
See also
Event, Semaphore, ConditionVariable
Note
Only available when kernel is compiled with KERNEL_SYNC mode enabled.
Examples
D:/SVN/private/stk/interop/c/include/stk_c.h.

Definition at line 75 of file stk_sync_eventflags.h.

Constructor & Destructor Documentation

◆ EventFlags() [1/2]

stk::sync::EventFlags::EventFlags ( uint32_t initial_flags = 0U)
inlineexplicit

Constructor.

Parameters
[in]initial_flagsInitial value of the 32-bit flags word. Only bits 0..30 are meaningful; bit 31 is reserved.

Definition at line 133 of file stk_sync_eventflags.h.

133 : m_flags(initial_flags)
134 {
135 STK_ASSERT((initial_flags & ERROR_MASK) == 0U); // API contract: bit 31 must not be set
136 }
#define STK_ASSERT(e)
Runtime assertion. Halts execution if the expression e evaluates to false.
Definition stk_defs.h:516
volatile uint32_t m_flags
32-bit flags word (bit 31 is reserved for errors)
static const uint32_t ERROR_MASK
Reserved error mask. Any return value with bit 31 set is an error.

References ERROR_MASK, m_flags, and STK_ASSERT.

Referenced by EventFlags().

Here is the caller graph for this function:

◆ ~EventFlags()

stk::sync::EventFlags::~EventFlags ( )
default

Destructor.

Note
If tasks are still waiting at destruction time it is a logical error (dangling waiters). An assertion is triggered in debug builds.
MISRA deviation: [STK-DEV-005] Rule 10-3-2.

References OPT_WAIT_ANY, STK_VIRT_DTOR, and stk::WAIT_INFINITE.

Referenced by tx_event_flags_delete().

Here is the caller graph for this function:

◆ EventFlags() [2/2]

stk::sync::EventFlags::EventFlags ( const EventFlags & )
privatedelete

References EventFlags().

Here is the call graph for this function:

Member Function Documentation

◆ Clear()

uint32_t stk::sync::EventFlags::Clear ( uint32_t flags)
inline

Clear one or more flags.

Atomically clears the specified flags from the internal word.

Parameters
[in]flagsBitmask of flags to clear. Must not have bit 31 set.
Returns
The flags word value before clearing, or ERROR_PARAMETER if flags is 0 or has bit 31 set.
Note
ISR-safe.

Definition at line 285 of file stk_sync_eventflags.h.

286{
287 uint32_t result = ERROR_PARAMETER;
288
289 if ((flags != 0U) && ((flags & ERROR_MASK) == 0U))
290 {
291 const ScopedCriticalSection cs_;
292
293 result = m_flags;
294 m_flags &= ~flags;
295 }
296
297 return result;
298}
static const uint32_t ERROR_PARAMETER
Return sentinel: invalid flags argument (bit 31 set).

References ERROR_MASK, ERROR_PARAMETER, and m_flags.

Referenced by osThreadFlagsClear(), stk_ef_clear(), and tx_event_flags_set().

Here is the caller graph for this function:

◆ Get()

uint32_t stk::sync::EventFlags::Get ( ) const
inline

Read the current flags word without modifying it.

Returns
Snapshot of the current 32-bit flags word.
Note
The returned value is a point-in-time snapshot; it may be stale by the time the caller acts on it.
ISR-safe.

Definition at line 304 of file stk_sync_eventflags.h.

305{
306 // atomic on 32-bit aligned targets, a critical section is not required for
307 // a single-word read, matching the approach used by Semaphore::GetCount()
308 return m_flags;
309}

References m_flags.

Referenced by stk_ef_get(), tx_event_flags_info_get(), xEventGroupGetBits(), and xEventGroupWaitBits().

Here is the caller graph for this function:

◆ GetFirstWaiterTid()

TId stk::sync::EventFlags::GetFirstWaiterTid ( ) const
inline

Get id of the task which is first in the wait list (FIFO order), i.e. the one that WakeOne() would wake next.

Returns
TId of the first waiter, or TID_NONE if no tasks are currently waiting.
Note
Read-only introspection for diagnostics / telemetry.
The result is a snapshot: call inside the critical section (see hw::CriticalSection, sync::ScopedCrticalSection) if the list may change concurrently.
See also
GetWaitList

Definition at line 239 of file stk_sync_eventflags.h.

240 {
241 return m_cv.GetFirstWaiterTid();
242 }
ConditionVariable m_cv
woken by Set() to re-evaluate waiting tasks

References m_cv.

Referenced by anonymous_namespace{threadx_stk.cpp}::FillSuspended().

Here is the caller graph for this function:

◆ GetTraceName()

const char * stk::ITraceable::GetTraceName ( ) const
inlineinherited

Get name.

Returns
Name string, or NULL if not set or if STK_SYNC_DEBUG_NAMES is 0.

Definition at line 582 of file stk_common.h.

583 {
584 #if STK_SYNC_DEBUG_NAMES
585 return m_trace_name;
586 #else
587 return nullptr;
588 #endif
589 }

◆ GetWaitList()

const IWaitObject::ListHeadType & stk::sync::EventFlags::GetWaitList ( ) const
inline

Get list of tasks blocked on this object.

Note
Read-only access for diagnostics / telemetry.
The result is a snapshot: call inside the critical section (see hw::CriticalSection, sync::ScopedCrticalSection) if the list may change concurrently.

Definition at line 226 of file stk_sync_eventflags.h.

227 {
228 return m_cv.GetWaitList();
229 }

References m_cv.

Referenced by anonymous_namespace{threadx_stk.cpp}::FillSuspended().

Here is the caller graph for this function:

◆ IsError()

bool stk::sync::EventFlags::IsError ( uint32_t result)
inlinestatic

Checks if a return value from Set(), Clear(), or Wait() is an error.

Returns
true when the value carries an error sentinel (bit 31 set).

Definition at line 123 of file stk_sync_eventflags.h.

123{ return ((result & ERROR_MASK) != 0U); }

References ERROR_MASK.

Referenced by StkFlagsResultToCmsis(), StkFlagsToFrtos(), tx_event_flags_get(), xEventGroupSetBitsFromISR(), and xEventGroupSync().

Here is the caller graph for this function:

◆ IsSatisfied()

bool stk::sync::EventFlags::IsSatisfied ( uint32_t flags,
uint32_t options ) const
inlineprivate

Definition at line 249 of file stk_sync_eventflags.h.

250 {
251 return ((options & OPT_WAIT_ALL) == OPT_WAIT_ALL) ? ((m_flags & flags) == flags) :
252 ((m_flags & flags) != 0U);
253 }
static const uint32_t OPT_WAIT_ALL
Wait for ALL of the specified flags to be set simultaneously (AND semantics).

References m_flags, and OPT_WAIT_ALL.

Referenced by Wait().

Here is the caller graph for this function:

◆ operator=()

EventFlags & stk::sync::EventFlags::operator= ( const EventFlags & )
privatedelete

◆ Set()

uint32_t stk::sync::EventFlags::Set ( uint32_t flags)
inline

Set one or more flags.

Performs an atomic OR of flags into the internal flags word, then wakes all tasks currently waiting on this object so that each can re-evaluate its own wait condition.

Parameters
[in]flagsBitmask of flags to set. Must not have bit 31 set.
Returns
The flags word value after setting, or ERROR_PARAMETER if flags is 0 or has bit 31 set.
Note
ISR-safe.

Definition at line 263 of file stk_sync_eventflags.h.

264{
265 uint32_t final_result = ERROR_PARAMETER;
266
267 if ((flags != 0U) && ((flags & ERROR_MASK) == 0U))
268 {
269 const ScopedCriticalSection cs_;
270
271 m_flags |= flags;
272 final_result = m_flags;
273
274 // wake all waiters: each task will re-evaluate its own predicate
275 m_cv.NotifyAll_CS();
276 }
277
278 return final_result;
279}

References ERROR_MASK, ERROR_PARAMETER, m_cv, and m_flags.

Referenced by osThreadFlagsSet(), stk_ef_set(), tx_event_flags_set(), and xEventGroupSync().

Here is the caller graph for this function:

◆ SetTraceName()

void stk::ITraceable::SetTraceName ( const char * name)
inlineinherited

Set name.

Parameters
[in]nameNull-terminated string or NULL.
Note
If STK_SYNC_DEBUG_NAMES is 0 then calling this function has no effect.

Definition at line 570 of file stk_common.h.

571 {
572 #if STK_SYNC_DEBUG_NAMES
573 m_trace_name = name;
574 #else
575 STK_UNUSED(name);
576 #endif
577 }
#define STK_UNUSED(X)
Explicitly marks a variable as unused to suppress compiler warnings.
Definition stk_defs.h:715

References STK_UNUSED.

Referenced by stk::memory::BlockMemoryPool::BlockMemoryPool(), stk::memory::BlockMemoryPool::BlockMemoryPool(), stk::memory::BytePool::BytePool(), stk::memory::BytePool::BytePool(), tx_block_pool_create(), tx_event_flags_create(), tx_mutex_create(), tx_queue_create(), and tx_semaphore_create().

Here is the caller graph for this function:

◆ TryWait()

uint32_t stk::sync::EventFlags::TryWait ( uint32_t flags,
uint32_t options = OPT_WAIT_ANY )
inline

Non-blocking flag poll.

Checks immediately whether the flag condition is satisfied. Clears matched flags on success unless NO_CLEAR is set.

Parameters
[in]flagsBitmask of flag bits to watch.
[in]optionsWAIT_ANY (default) or WAIT_ALL, optionally NO_CLEAR.
Returns
Matched flags bitmask, or an ERROR_* sentinel.
Note
ISR-safe.

Definition at line 216 of file stk_sync_eventflags.h.

217 {
218 return Wait(flags, options, NO_WAIT);
219 }
static constexpr Timeout NO_WAIT
Timeout value: return immediately if the synchronization object is not yet signaled (non-blocking pol...
Definition stk_common.h:234

References stk::NO_WAIT, OPT_WAIT_ANY, and Wait().

Referenced by stk_ef_trywait().

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

◆ Wait()

uint32_t stk::sync::EventFlags::Wait ( uint32_t flags,
uint32_t options = OPT_WAIT_ANY,
Timeout timeout_ticks = WAIT_INFINITE )
inline

Wait for one or more flags to be set.

Suspends the calling task until the requested flag condition is satisfied or the timeout expires.

On success the matched flags are atomically cleared (unless NO_CLEAR is passed in options).

Parameters
[in]flagsBitmask of flag bits to watch. Must not be 0 and must not have bit 31 set.
[in]optionsCombination of WAIT_ANY / WAIT_ALL and optionally NO_CLEAR. Default: WAIT_ANY (clear on success).
[in]timeout_ticksMaximum time to wait (ticks). Use WAIT_INFINITE to block indefinitely, NO_WAIT for a non-blocking poll.
Returns
Bitmask of the flags that caused the wakeup (the matched subset), or one of the ERROR_* sentinels on failure. Always check IsError() before using the return value as a flags mask.
Note
If the predicate becomes satisfied in the same tick that the deadline expires, the wait succeeds and returns the matched flags. The timeout is only reported when the condition is not met at deadline time.
Returns ERROR_CANCELED, not ERROR_TIMEOUT, if the wait was interrupted via IKernel::CancelTaskWait() before either the flag condition was met or the deadline expired.
Warning
ISR-safe only with timeout_ticks = NO_WAIT, ISR-unsafe otherwise.

Definition at line 315 of file stk_sync_eventflags.h.

316{
317 uint32_t final_result = 0U;
318
319 // validate: flags must be non-zero and must not have the error sentinel bit set
320 if ((flags == 0U) || ((flags & ERROR_MASK) != 0U))
321 {
322 final_result = ERROR_PARAMETER;
323 }
324 // ISR check: only NO_WAIT is permitted inside an ISR
325 else if (hw::IsInsideISR() && (timeout_ticks != NO_WAIT))
326 {
327 final_result = ERROR_ISR;
328 }
329 else
330 {
331 const bool timed_wait = (timeout_ticks != WAIT_INFINITE) && (timeout_ticks != NO_WAIT);
332
333 // capture an absolute deadline once, before entering the wait loop,
334 // this prevents the timeout from being silently restarted on each
335 // spurious wakeup (e.g. a partial Set() that does not satisfy WAIT_ALL)
336 const Timeout deadline = (timed_wait ?
337 static_cast<Timeout>(GetTicks() + timeout_ticks) : timeout_ticks);
338
339 ScopedCriticalSection cs_;
340
341 // spin (with blocking) until the predicate is satisfied or we time out
342 while (!IsSatisfied(flags, options))
343 {
344 Timeout remaining = deadline;
345 if (timed_wait)
346 {
347 const Timeout now = static_cast<Timeout>(GetTicks());
348 remaining = (now >= deadline ? NO_WAIT : (deadline - now));
349 }
350
351 const EWaitResult wr = m_cv.WaitEx(cs_, remaining);
352
353 if (wr == WAIT_RESULT_CANCELED)
354 {
355 // cancelled by IKernel::CancelTaskWait(): stop immediately, do not
356 // reinterpret as a timeout and do not keep spinning on the predicate
357 final_result = ERROR_CANCELED;
358 break;
359 }
360 else if (wr == WAIT_RESULT_FAIL)
361 {
362 // kernel rejected the wait: report it as such, not as a timeout
363 final_result = ERROR_FAIL;
364 break;
365 }
366 else if (wr != WAIT_RESULT_SIGNAL)
367 {
368 // timeout (either a real deadline miss, or NO_WAIT after 'remaining'
369 // collapsed to NO_WAIT): mark failure and flag the loop to terminate
370 final_result = ERROR_TIMEOUT;
371 break;
372 }
373 // else: WAIT_RESULT_SIGNAL - a Set() woke us for re-evaluation (possibly a
374 // spurious/partial match under WAIT_ALL); loop back and re-check IsSatisfied()
375 }
376
377 // If we didn't time out or get cancelled, the predicate was satisfied successfully
378 if ((final_result != ERROR_TIMEOUT) && (final_result != ERROR_CANCELED) &&
379 (final_result != ERROR_FAIL))
380 {
381 // predicate satisfied: determine which flags matched
382 final_result = (((options & OPT_WAIT_ALL) == OPT_WAIT_ALL) ? flags : (m_flags & flags));
383
384 // atomically clear the matched flags unless the caller opted out
385 if ((options & OPT_NO_CLEAR) == 0U)
386 {
387 m_flags &= ~final_result;
388 }
389 }
390 }
391
392 return final_result;
393}
EWaitResult
Wait result (see IKernelService::Wait).
Definition stk_common.h:137
@ WAIT_RESULT_FAIL
IKernelService::Wait returned with error without waiting.
Definition stk_common.h:138
@ WAIT_RESULT_CANCELED
The wait was cancelled by another task via IKernel::CancelTaskWait(), independent of signal/timeout.
Definition stk_common.h:141
@ WAIT_RESULT_SIGNAL
The wake was caused by a signal.
Definition stk_common.h:139
int32_t Timeout
Timeout time (ticks).
Definition stk_common.h:170
static Ticks GetTicks()
Get number of ticks elapsed since kernel start.
Definition stk_helper.h:452
static constexpr Timeout WAIT_INFINITE
Timeout value: block indefinitely until the synchronization object is signaled.
Definition stk_common.h:228
bool IsInsideISR()
Check whether the CPU is currently executing inside a hardware interrupt service routine (ISR).
static const uint32_t ERROR_CANCELED
Return sentinel: the wait was cancelled via IKernel::CancelTaskWait() before the flag condition was m...
static const uint32_t ERROR_ISR
Return sentinel: called from an ISR with a blocking timeout.
static const uint32_t ERROR_FAIL
Return sentinel: the kernel rejected the wait (IKernelService::Wait() returned WAIT_RESULT_FAIL,...
static const uint32_t OPT_NO_CLEAR
Do not clear matched flags after a successful wait.
bool IsSatisfied(uint32_t flags, uint32_t options) const

References ERROR_CANCELED, ERROR_FAIL, ERROR_ISR, ERROR_MASK, ERROR_PARAMETER, ERROR_TIMEOUT, stk::GetTicks(), stk::hw::IsInsideISR(), IsSatisfied(), m_cv, m_flags, stk::NO_WAIT, OPT_NO_CLEAR, OPT_WAIT_ALL, stk::WAIT_INFINITE, stk::WAIT_RESULT_CANCELED, stk::WAIT_RESULT_FAIL, and stk::WAIT_RESULT_SIGNAL.

Referenced by osThreadFlagsWait(), stk_ef_wait(), TryWait(), tx_event_flags_get(), xEventGroupSync(), and xEventGroupWaitBits().

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

Member Data Documentation

◆ ERROR_CANCELED

const uint32_t stk::sync::EventFlags::ERROR_CANCELED = 0x80000008U
static

Return sentinel: the wait was cancelled via IKernel::CancelTaskWait() before the flag condition was met (independent of the deadline).

Definition at line 107 of file stk_sync_eventflags.h.

Referenced by StkFlagsResultToCmsis(), tx_event_flags_get(), and Wait().

◆ ERROR_FAIL

const uint32_t stk::sync::EventFlags::ERROR_FAIL = 0x80000010U
static

Return sentinel: the kernel rejected the wait (IKernelService::Wait() returned WAIT_RESULT_FAIL, e.g. KERNEL_SYNC mode is not enabled).

Definition at line 111 of file stk_sync_eventflags.h.

Referenced by StkFlagsResultToCmsis(), and Wait().

◆ ERROR_ISR

const uint32_t stk::sync::EventFlags::ERROR_ISR = 0x80000004U
static

Return sentinel: called from an ISR with a blocking timeout.

Definition at line 103 of file stk_sync_eventflags.h.

Referenced by StkFlagsResultToCmsis(), and Wait().

◆ ERROR_MASK

const uint32_t stk::sync::EventFlags::ERROR_MASK = 0x80000000U
static

Reserved error mask. Any return value with bit 31 set is an error.

Definition at line 114 of file stk_sync_eventflags.h.

Referenced by Clear(), EventFlags(), IsError(), Set(), and Wait().

◆ ERROR_PARAMETER

const uint32_t stk::sync::EventFlags::ERROR_PARAMETER = 0x80000001U
static

Return sentinel: invalid flags argument (bit 31 set).

Definition at line 97 of file stk_sync_eventflags.h.

Referenced by Clear(), Set(), StkFlagsResultToCmsis(), tx_event_flags_get(), and Wait().

◆ ERROR_TIMEOUT

const uint32_t stk::sync::EventFlags::ERROR_TIMEOUT = 0x80000002U
static

Return sentinel: wait timed out before the flags condition was met.

Definition at line 100 of file stk_sync_eventflags.h.

Referenced by StkFlagsResultToCmsis(), tx_event_flags_get(), and Wait().

◆ m_cv

ConditionVariable stk::sync::EventFlags::m_cv
private

woken by Set() to re-evaluate waiting tasks

Definition at line 256 of file stk_sync_eventflags.h.

Referenced by GetFirstWaiterTid(), GetWaitList(), Set(), and Wait().

◆ m_flags

volatile uint32_t stk::sync::EventFlags::m_flags
private

32-bit flags word (bit 31 is reserved for errors)

Definition at line 255 of file stk_sync_eventflags.h.

Referenced by Clear(), EventFlags(), Get(), IsSatisfied(), Set(), and Wait().

◆ OPT_NO_CLEAR

const uint32_t stk::sync::EventFlags::OPT_NO_CLEAR = 0x00000002U
static

Do not clear matched flags after a successful wait.

Definition at line 90 of file stk_sync_eventflags.h.

Referenced by BuildStkFlagsOpts(), CmsisFlagsOptionsToStk(), tx_event_flags_get(), and Wait().

◆ OPT_WAIT_ALL

const uint32_t stk::sync::EventFlags::OPT_WAIT_ALL = 0x00000001U
static

Wait for ALL of the specified flags to be set simultaneously (AND semantics).

Definition at line 87 of file stk_sync_eventflags.h.

Referenced by BuildStkFlagsOpts(), CmsisFlagsOptionsToStk(), IsSatisfied(), tx_event_flags_get(), Wait(), and xEventGroupSync().

◆ OPT_WAIT_ANY

const uint32_t stk::sync::EventFlags::OPT_WAIT_ANY = 0x00000000U
static

Wait for ANY of the specified flags to be set (OR semantics, default).

Definition at line 84 of file stk_sync_eventflags.h.

Referenced by BuildStkFlagsOpts(), CmsisFlagsOptionsToStk(), TryWait(), tx_event_flags_get(), and ~EventFlags().


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