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

Public Member Functions

 SyncWaitWakeRelaxCpuContext ()
void Process ()

Public Attributes

bool wake_all
uint32_t counter
PlatformTestMockplatform
SyncObjectMocksobj

Detailed Description

Definition at line 45 of file stktest_sync.cpp.

Constructor & Destructor Documentation

◆ SyncWaitWakeRelaxCpuContext()

stk::test::SyncWaitWakeRelaxCpuContext::SyncWaitWakeRelaxCpuContext ( )
inline

Definition at line 47 of file stktest_sync.cpp.

References counter, platform, sobj, and wake_all.

Member Function Documentation

◆ Process()

void stk::test::SyncWaitWakeRelaxCpuContext::Process ( )
inline

Definition at line 60 of file stktest_sync.cpp.

61 {
62 platform->ProcessTick();
63 ++counter;
64
65 if (!wake_all && (counter >= 5))
66 sobj->WakeOne();
67 else
68 if (wake_all && (counter >= 7))
69 sobj->WakeAll();
70 }

References counter, platform, sobj, and wake_all.

Member Data Documentation

◆ counter

uint32_t stk::test::SyncWaitWakeRelaxCpuContext::counter

Definition at line 56 of file stktest_sync.cpp.

Referenced by Process(), and SyncWaitWakeRelaxCpuContext().

◆ platform

PlatformTestMock* stk::test::SyncWaitWakeRelaxCpuContext::platform

Definition at line 57 of file stktest_sync.cpp.

Referenced by Process(), and SyncWaitWakeRelaxCpuContext().

◆ sobj

SyncObjectMock* stk::test::SyncWaitWakeRelaxCpuContext::sobj

Definition at line 58 of file stktest_sync.cpp.

Referenced by Process(), and SyncWaitWakeRelaxCpuContext().

◆ wake_all

bool stk::test::SyncWaitWakeRelaxCpuContext::wake_all

Definition at line 55 of file stktest_sync.cpp.

Referenced by Process(), and SyncWaitWakeRelaxCpuContext().


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