µ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++.
os::rtos::semaphore::attributes Class Reference

Semaphore attributes. More...

#include <cmsis-plus/rtos/os.h>

Inherits os::rtos::internal::attributes_clocked.

Inherited by os::rtos::semaphore::attributes_binary, and os::rtos::semaphore::attributes_counting.

Public Member Functions

Constructors & Destructor
constexpr attributes ()
 Construct a semaphore attributes object instance. More...
 
 attributes (const attributes &)=default
 
 attributes (attributes &&)=default
 
attributesoperator= (const attributes &)=default
 
attributesoperator= (attributes &&)=default
 
 ~attributes ()=default
 Destruct the semaphore attributes object instance. More...
 

Public Attributes

Public Member Variables
count_t sm_max_value = 1
 Semaphore max count value. More...
 
count_t sm_initial_value = 0
 Semaphore initial count value. More...
 
Public Member Variables
rtos::clockclock = nullptr
 Attribute with the address of the clock to be used for timeouts. More...
 

Detailed Description

Semaphore attributes.

The os::rtos::semaphore namespace groups semaphore types, attributes and initialisers.

Allow to assign a name and custom attributes (like initial count, max count) to the semaphore.

To simplify access, the member variables are public and do not require accessors or mutators.

POSIX compatibility
No POSIX similar functionality identified, but inspired by POSIX attributes used in <pthread.h> (IEEE Std 1003.1, 2013 Edition).

Definition at line 81 of file os-semaphore.h.

Constructor & Destructor Documentation

◆ attributes() [1/3]

constexpr os::rtos::semaphore::attributes::attributes ( )

Construct a semaphore attributes object instance.

Parameters
None.

Definition at line 666 of file os-semaphore.h.

◆ attributes() [2/3]

os::rtos::semaphore::attributes::attributes ( const attributes )
default

◆ attributes() [3/3]

os::rtos::semaphore::attributes::attributes ( attributes &&  )
default

◆ ~attributes()

os::rtos::semaphore::attributes::~attributes ( )
default

Destruct the semaphore attributes object instance.

Member Function Documentation

◆ operator=() [1/2]

attributes& os::rtos::semaphore::attributes::operator= ( const attributes )
default

◆ operator=() [2/2]

attributes& os::rtos::semaphore::attributes::operator= ( attributes &&  )
default

Member Data Documentation

◆ clock

rtos::clock* os::rtos::internal::attributes_clocked::clock = nullptr
inherited

Attribute with the address of the clock to be used for timeouts.

It may be one of os::rtos::sysclock, os::rtos::rtclock, or any other user object derived from class os::rtos::clock.

If nullptr, the default clock is os::rtos::sysclock.

Definition at line 615 of file os-decls.h.

◆ sm_initial_value

semaphore::count_t os::rtos::semaphore::attributes::sm_initial_value = 0

Semaphore initial count value.

This values represents the number of resources initially available to the semaphore.

Definition at line 147 of file os-semaphore.h.

◆ sm_max_value

semaphore::count_t os::rtos::semaphore::attributes::sm_max_value = 1

Semaphore max count value.

This values represents the maximum number of resources available to the semaphore.

Definition at line 142 of file os-semaphore.h.


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