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

Functions

void thread (const TickClock::time_point sleepUntil, SequenceAsserter &sequenceAsserter, const unsigned int sequencePoint, TickClock::duration &timePointDeviation, int &sharedRet)
 Test thread. More...
 
DynamicThread makeTestThread (const TickClock::time_point now, const ThreadParameters &threadParameters, SequenceAsserter &sequenceAsserter, TickClock::duration &timePointDeviation, int &sharedRet)
 Builder of test threads. More...
 

Variables

constexpr size_t testThreadStackSize {512}
 size of stack for test thread, bytes More...
 
constexpr uint8_t timePointOffset {10}
 offset added to sleepUntil time points - there is some time between configuring thread and actually starting it... More...
 

Function Documentation

◆ makeTestThread()

DynamicThread distortos::test::anonymous_namespace{ThreadSleepUntilTestCase.cpp}::makeTestThread ( const TickClock::time_point  now,
const ThreadParameters threadParameters,
SequenceAsserter sequenceAsserter,
TickClock::duration timePointDeviation,
int &  sharedRet 
)

Builder of test threads.

This test uses "priority" field of test parameters as a "reversed" amount of time to sleep.

Parameters
[in]nowis the current time point
[in]threadParametersis a reference to ThreadParameters object
[in]sequenceAsserteris a reference to SequenceAsserter shared object
[out]timePointDeviationis a reference to variable for storing deviation of time point of waking up
[out]sharedRetis a reference to variable for storing return value of ThisThread::sleepUntil()
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{ThreadSleepUntilTestCase.cpp}::thread ( const TickClock::time_point  sleepUntil,
SequenceAsserter sequenceAsserter,
const unsigned int  sequencePoint,
TickClock::duration timePointDeviation,
int &  sharedRet 
)

Test thread.

Sleeps until requested time point and marks the sequence point in SequenceAsserter, also storing the deviation of time point of waking up.

Parameters
[in]sleepUntilis the time point at which the thread will wake up to mark sequence point
[in]sequenceAsserteris a reference to SequenceAsserter shared object
[in]sequencePointis the sequence point of this instance
[out]timePointDeviationis a reference to variable for storing deviation of time point of waking up
[out]sharedRetis a reference to variable for storing return value of ThisThread::sleepUntil()
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ testThreadStackSize

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

size of stack for test thread, bytes

◆ timePointOffset

constexpr uint8_t distortos::test::anonymous_namespace{ThreadSleepUntilTestCase.cpp}::timePointOffset {10}

offset added to sleepUntil time points - there is some time between configuring thread and actually starting it...