µOS++ IIIe Reference  v6.3.15
“Perfekt ist nicht gut genug”
The third edition of µOS++, a POSIX inspired open source system, written in C++.

C++ API mutexes definitions. More...

Classes

class  os::rtos::mutex::attributes
 Mutex attributes. More...
 
class  os::rtos::mutex::attributes_recursive
 Recursive mutex attributes. More...
 
class  os::rtos::mutex
 POSIX compliant mutex. More...
 
class  os::rtos::mutex_recursive
 POSIX compliant recursive mutex. More...
 
class  os::rtos::mutex::protocol
 Mutex protocols. More...
 
class  os::rtos::mutex::robustness
 Mutex robustness. More...
 
class  os::rtos::mutex::type
 Mutex types. More...
 

Types

using os::rtos::mutex::count_t = uint16_t
 Type of variables holding mutex recursion counters. More...
 
using os::rtos::mutex::protocol_t = uint8_t
 Type of variables holding mutex protocols. More...
 
using os::rtos::mutex::robustness_t = uint8_t
 Type of variables holding mutex robustness. More...
 
using os::rtos::mutex::type_t = uint8_t
 Type of variables holding mutex behaviours. More...
 

Variables

static const attributes os::rtos::mutex::initializer_normal
 Default normal mutex initialiser. More...
 
static const attributes_recursive os::rtos::mutex::initializer_recursive
 Default recursive mutex initialiser. More...
 
static constexpr count_t os::rtos::mutex::max_count = 0xFFFF
 Constant with the maximum value for the recursion counter. More...
 

Detailed Description

C++ API mutexes definitions.

Examples
int
os_main (int argc, char* argv[])
{
{
mutex mx1;
mx1.lock ();
mx1.unlock ();
mx1.try_lock ();
mx1.unlock ();
mx1.timed_lock (10);
mx1.unlock ();
mx1.name ();
mx1.type ();
mx1.protocol ();
mx1.robustness ();
mx1.owner ();
thread::priority_t prio = mx1.prio_ceiling ();
mx1.prio_ceiling (prio);
mx1.reset ();
}
{
mutex mx2
{ "mx2" };
mx2.lock ();
mx2.unlock ();
}
{
mutex mx3
{ "mx2", mutex::initializer_recursive };
mx3.lock ();
mx3.unlock ();
}
}

Types

◆ count_t

using os::rtos::mutex::count_t = uint16_t

Type of variables holding mutex recursion counters.

Definition at line 192 of file os-mutex.h.

◆ protocol_t

using os::rtos::mutex::protocol_t = uint8_t

Type of variables holding mutex protocols.

Definition at line 61 of file os-mutex.h.

◆ robustness_t

Type of variables holding mutex robustness.

Definition at line 107 of file os-mutex.h.

◆ type_t

using os::rtos::mutex::type_t = uint8_t

Type of variables holding mutex behaviours.

Definition at line 148 of file os-mutex.h.

Variable Documentation

◆ initializer_normal

const mutex::attributes os::rtos::mutex::initializer_normal
static

Default normal mutex initialiser.

This variable is used by the normal mutex default constructor.

Definition at line 302 of file os-mutex.h.

◆ initializer_recursive

const mutex::attributes_recursive os::rtos::mutex::initializer_recursive
static

Default recursive mutex initialiser.

This variable is used by the recursive mutex default constructor.

Definition at line 351 of file os-mutex.h.

◆ max_count

constexpr count_t os::rtos::mutex::max_count = 0xFFFF
static

Constant with the maximum value for the recursion counter.

Definition at line 198 of file os-mutex.h.