distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
distortos::test::anonymous_namespace{ThreadSchedulingPolicyTestCase.cpp} Namespace Reference

Typedefs

using SequencePoints = std::pair< unsigned int, unsigned int >
 pair of sequence points More...
 

Functions

void thread (SequenceAsserter &sequenceAsserter, const SequencePoints sequencePoints)
 Test thread. More...
 
DynamicThread makeTestThread (const SchedulingPolicy schedulingPolicy, SequenceAsserter &sequenceAsserter, const SequencePoints sequencePoints)
 Builder of test threads. More...
 

Variables

constexpr size_t testThreadStackSize {512}
 size of stack for test thread, bytes More...
 
constexpr uint8_t testThreadPriority {1}
 priority of test thread More...
 
constexpr size_t totalThreads {8}
 number of test threads More...
 
constexpr auto testThreadDuration = internal::RoundRobinQuantum::getInitial() * 2
 duration of single test thread - significantly longer than single round-robin quantum More...
 

Typedef Documentation

◆ SequencePoints

using distortos::test::anonymous_namespace{ThreadSchedulingPolicyTestCase.cpp}::SequencePoints = typedef std::pair<unsigned int, unsigned int>

pair of sequence points

Function Documentation

◆ makeTestThread()

DynamicThread distortos::test::anonymous_namespace{ThreadSchedulingPolicyTestCase.cpp}::makeTestThread ( const SchedulingPolicy  schedulingPolicy,
SequenceAsserter sequenceAsserter,
const SequencePoints  sequencePoints 
)

Builder of test threads.

Parameters
[in]schedulingPolicyis the scheduling policy of the test thread
[in]sequenceAsserteris a reference to SequenceAsserter shared object
[in]sequencePointsis a pair of sequence points for this instance
Returns
constructed DynamicThread object
Here is the call graph for this function:
Here is the caller graph for this function:

◆ thread()

void distortos::test::anonymous_namespace{ThreadSchedulingPolicyTestCase.cpp}::thread ( SequenceAsserter sequenceAsserter,
const SequencePoints  sequencePoints 
)

Test thread.

Marks the first sequence point in SequenceAsserter, wastes some time and marks the second sequence point in SequenceAsserter.

Parameters
[in]sequenceAsserteris a reference to SequenceAsserter shared object
[in]sequencePointsis a pair of sequence points for this instance
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ testThreadDuration

constexpr auto distortos::test::anonymous_namespace{ThreadSchedulingPolicyTestCase.cpp}::testThreadDuration = internal::RoundRobinQuantum::getInitial() * 2

duration of single test thread - significantly longer than single round-robin quantum

◆ testThreadPriority

constexpr uint8_t distortos::test::anonymous_namespace{ThreadSchedulingPolicyTestCase.cpp}::testThreadPriority {1}

priority of test thread

◆ testThreadStackSize

constexpr size_t distortos::test::anonymous_namespace{ThreadSchedulingPolicyTestCase.cpp}::testThreadStackSize {512}

size of stack for test thread, bytes

◆ totalThreads

constexpr size_t distortos::test::anonymous_namespace{ThreadSchedulingPolicyTestCase.cpp}::totalThreads {8}

number of test threads