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

Public Member Functions

 EDFDynamicSchedulingContext ()
void Process ()

Public Attributes

uint32_t counter
uint32_t checked
PlatformTestMockplatform
TaskMock< ACCESS_USER > * task1
TaskMock< ACCESS_USER > * task2
TaskMock< ACCESS_USER > * task3

Detailed Description

Definition at line 232 of file stktest_switchstrategyedf.cpp.

Constructor & Destructor Documentation

◆ EDFDynamicSchedulingContext()

stk::test::EDFDynamicSchedulingContext::EDFDynamicSchedulingContext ( )
inline

Member Function Documentation

◆ Process()

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

Definition at line 248 of file stktest_switchstrategyedf.cpp.

249 {
250 platform->ProcessTick();
251 ++counter;
252
253 // active task after this tick
254 Stack *active = platform->m_stack_active;
255
256 if (counter == 1)
257 {
258 CHECK_EQUAL_TEXT((size_t)task3->GetStack(), active->SP, "tick 0: task3 earliest deadline");
259 ++checked;
260 Yield();
261 }
262 else
263 if (counter == 2)
264 {
265 CHECK_EQUAL_TEXT((size_t)task2->GetStack(), active->SP, "tick 1: task2 earliest deadline");
266 ++checked;
267 Yield();
268 }
269 else
270 if (counter == 3)
271 {
272 CHECK_EQUAL_TEXT((size_t)task1->GetStack(), active->SP, "tick 3+: task1 earliest deadline");
273 ++checked;
274 Yield();
275 }
276 }
void Yield()
Notify scheduler to switch to the next runnable task.
Definition stk_helper.h:331

References checked, counter, platform, stk::Stack::SP, task1, task2, task3, and stk::Yield().

Here is the call graph for this function:

Member Data Documentation

◆ checked

uint32_t stk::test::EDFDynamicSchedulingContext::checked

Definition at line 244 of file stktest_switchstrategyedf.cpp.

Referenced by EDFDynamicSchedulingContext(), and Process().

◆ counter

uint32_t stk::test::EDFDynamicSchedulingContext::counter

Definition at line 244 of file stktest_switchstrategyedf.cpp.

Referenced by EDFDynamicSchedulingContext(), and Process().

◆ platform

PlatformTestMock* stk::test::EDFDynamicSchedulingContext::platform

Definition at line 245 of file stktest_switchstrategyedf.cpp.

Referenced by EDFDynamicSchedulingContext(), and Process().

◆ task1

TaskMock<ACCESS_USER>* stk::test::EDFDynamicSchedulingContext::task1

Definition at line 246 of file stktest_switchstrategyedf.cpp.

Referenced by EDFDynamicSchedulingContext(), and Process().

◆ task2

TaskMock<ACCESS_USER> * stk::test::EDFDynamicSchedulingContext::task2

Definition at line 246 of file stktest_switchstrategyedf.cpp.

Referenced by EDFDynamicSchedulingContext(), and Process().

◆ task3

TaskMock<ACCESS_USER> * stk::test::EDFDynamicSchedulingContext::task3

Definition at line 246 of file stktest_switchstrategyedf.cpp.

Referenced by EDFDynamicSchedulingContext(), and Process().


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