distortos  v0.5.0
object-oriented C++ RTOS for microcontrollers
distortos::test::anonymous_namespace{MutexPriorityInheritanceOperationsTestCase.cpp}::LockThread Class Reference
Collaboration diagram for distortos::test::anonymous_namespace{MutexPriorityInheritanceOperationsTestCase.cpp}::LockThread:

Public Member Functions

constexpr LockThread (Mutex *const mutex1, Mutex *const mutex2, Mutex *const mutex3)
 LockThread's constructor. More...
int getRet () const
void operator() ()
 Main function of the thread. More...

Private Attributes

std::array< Mutex *, 3 > mutexes_
 array with pointers to mutexes More...
int ret_
 combined return value of Mutex::lock() / Mutex::unlock() More...

Detailed Description

functor class used in testBasicPriorityInheritance() and testPriorityChange() - it locks 0-3 mutexes and unlocks them afterwards

Constructor & Destructor Documentation

◆ LockThread()

constexpr distortos::test::anonymous_namespace{MutexPriorityInheritanceOperationsTestCase.cpp}::LockThread::LockThread ( Mutex *const  mutex1,
Mutex *const  mutex2,
Mutex *const  mutex3 

LockThread's constructor.

[in]mutex1is a pointer to first mutex
[in]mutex2is a pointer to second mutex
[in]mutex3is a pointer to third mutex

Member Function Documentation

◆ getRet()

int distortos::test::anonymous_namespace{MutexPriorityInheritanceOperationsTestCase.cpp}::LockThread::getRet ( ) const
combined return value of Mutex::lock() / Mutex::unlock()

◆ operator()()

void distortos::test::anonymous_namespace{MutexPriorityInheritanceOperationsTestCase.cpp}::LockThread::operator() ( )

Main function of the thread.

Locks all provided mutexes and then unlocks them in the same order.

Member Data Documentation

◆ mutexes_

std::array<Mutex*, 3> distortos::test::anonymous_namespace{MutexPriorityInheritanceOperationsTestCase.cpp}::LockThread::mutexes_

array with pointers to mutexes

◆ ret_

int distortos::test::anonymous_namespace{MutexPriorityInheritanceOperationsTestCase.cpp}::LockThread::ret_

combined return value of Mutex::lock() / Mutex::unlock()

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