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::SleepAndWakeTicklessRelaxCpuContext Struct Reference
Collaboration diagram for stk::test::SleepAndWakeTicklessRelaxCpuContext:

Public Member Functions

 SleepAndWakeTicklessRelaxCpuContext ()
void Process ()

Public Attributes

uint32_t counter
PlatformTestMockplatform

Detailed Description

Definition at line 609 of file stktest_kernelservice.cpp.

Constructor & Destructor Documentation

◆ SleepAndWakeTicklessRelaxCpuContext()

stk::test::SleepAndWakeTicklessRelaxCpuContext::SleepAndWakeTicklessRelaxCpuContext ( )
inline

Definition at line 611 of file stktest_kernelservice.cpp.

References counter, and platform.

Member Function Documentation

◆ Process()

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

Definition at line 620 of file stktest_kernelservice.cpp.

621 {
622 platform->ProcessTick();
623
624 if (counter == 0)
625 {
626 // expecting 2 sleep ticks (Sleep(3) = 1 + 2
627 CHECK_EQUAL(2, platform->m_ticks_count);
628 }
629
630 ++counter;
631 }

References counter, and platform.

Member Data Documentation

◆ counter

uint32_t stk::test::SleepAndWakeTicklessRelaxCpuContext::counter

Definition at line 617 of file stktest_kernelservice.cpp.

Referenced by Process(), and SleepAndWakeTicklessRelaxCpuContext().

◆ platform

PlatformTestMock* stk::test::SleepAndWakeTicklessRelaxCpuContext::platform

Definition at line 618 of file stktest_kernelservice.cpp.

Referenced by Process(), and SleepAndWakeTicklessRelaxCpuContext().


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