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::EventFlagsT< T >::SyncContext Struct Reference

State of one Sync() rendezvous group, supplied by the caller. More...

#include <stk_sync_eventflags.h>

Collaboration diagram for stk::sync::EventFlagsT< T >::SyncContext:

Public Member Functions

 SyncContext ()

Public Attributes

uint32_t m_gen
 rendezvous generation, incremented when the rendezvous completes
T m_snapshot
 flags word captured when the last rendezvous completed

Detailed Description

template<typename T>
struct stk::sync::EventFlagsT< T >::SyncContext

State of one Sync() rendezvous group, supplied by the caller.

One SyncContext object represents one rendezvous group: it must be shared by (and only by) all tasks which rendezvous together, e.g. a global or static object next to the EventFlagsT object. It carries the generation counter and the flags snapshot used to release all blocked participants when the rendezvous completes, so EventFlagsT itself needs no extra state. Independent groups on the same EventFlagsT object use separate contexts. The object must outlive all calls using it and must not be copied while tasks are blocked on it.

Definition at line 312 of file stk_sync_eventflags.h.

Constructor & Destructor Documentation

◆ SyncContext()

template<typename T>
stk::sync::EventFlagsT< T >::SyncContext::SyncContext ( )
inline

Definition at line 314 of file stk_sync_eventflags.h.

314 : m_gen(0U), m_snapshot(0U)
315 {}
Event flags group for multi-flag synchronization between tasks, with a selectable flags word type.
T m_snapshot
flags word captured when the last rendezvous completed
uint32_t m_gen
rendezvous generation, incremented when the rendezvous completes

References m_gen, and m_snapshot.

Member Data Documentation

◆ m_gen

template<typename T>
uint32_t stk::sync::EventFlagsT< T >::SyncContext::m_gen

rendezvous generation, incremented when the rendezvous completes

Definition at line 317 of file stk_sync_eventflags.h.

Referenced by stk::sync::EventFlagsT< T >::Sync(), and SyncContext().

◆ m_snapshot

template<typename T>
T stk::sync::EventFlagsT< T >::SyncContext::m_snapshot

flags word captured when the last rendezvous completed

Definition at line 318 of file stk_sync_eventflags.h.

Referenced by stk::sync::EventFlagsT< T >::Sync(), and SyncContext().


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