distortos  v0.4.0
object-oriented C++ RTOS for microcontrollers
MutexPriorityProtocolTestCase.cpp File Reference

MutexPriorityProtocolTestCase class implementation. More...

Include dependency graph for MutexPriorityProtocolTestCase.cpp:

Classes

struct  distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::TestStep
 single test step for test thread More...
 

Namespaces

 distortos
 Top-level namespace of distortos project.
 
 distortos::test
 Functional tests of distortos project.
 

Typedefs

using distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::TestStepRange = estd::ContiguousRange< const TestStep >
 range with test steps More...
 

Functions

void distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::thread (const TickClock::time_point sleepUntil, SequenceAsserter &sequenceAsserter, const TestStepRange &steps)
 Test thread. More...
 
DynamicThread distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::makeAndStartTestThread (const uint8_t priority, const TickClock::time_point sleepUntil, SequenceAsserter &sequenceAsserter, const TestStepRange &steps)
 Makes and starts test thread. More...
 
bool distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::testRunner (const std::array< int, totalThreads > &delays, const std::array< TestStepRange, totalThreads > &stepsRanges, const size_t expectedContextSwitchesCount)
 Common code to run the test. More...
 
bool distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::priorityInheritancePhase ()
 Test phase of PriorityInheritance protocol. More...
 
bool distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::priorityProtectPhase ()
 Test phase of PriorityProtect protocol. More...
 

Variables

constexpr size_t distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::testThreadStackSize {512}
 size of stack for test thread, bytes More...
 
constexpr size_t distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::totalThreads {5}
 total number of test threads More...
 
constexpr TickClock::duration distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::durationUnit {10}
 duration unit used in test More...
 
const std::array< int, totalThreads > distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::threadDelays
 array with delays of test threads (in durationUnit) More...
 
constexpr size_t distortos::test::anonymous_namespace{MutexPriorityProtocolTestCase.cpp}::delayedStartContextSwitchesCount {4}
 number of context switches caused by delayed start of test threads More...
 

Detailed Description

MutexPriorityProtocolTestCase class implementation.

Author
Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info
License
This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.