Semaphore attributes. More...
#include <cmsis-plus/rtos/os.h>
Public Member Functions | |
Constructors & Destructor | |
constexpr | attributes () |
Construct a semaphore attributes object instance. | |
attributes (const attributes &)=default | |
attributes (attributes &&)=default | |
attributes & | operator= (const attributes &)=default |
attributes & | operator= (attributes &&)=default |
~attributes ()=default | |
Destruct the semaphore attributes object instance. | |
Public Attributes | |
Public Member Variables | |
count_t | sm_max_value = 1 |
Semaphore max count value. | |
count_t | sm_initial_value = 0 |
Semaphore initial count value. | |
Public Member Variables | |
rtos::clock * | clock = nullptr |
Attribute with the address of the clock to be used for timeouts. | |
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.
If the attributes are modified after the semaphore creation, the semaphore attributes shall not be affected.
<pthread.h>
(IEEE Std 1003.1, 2013 Edition). Definition at line 84 of file os-semaphore.h.
|
constexpr |
Construct a semaphore attributes object instance.
Definition at line 669 of file os-semaphore.h.
|
default |
|
default |
|
default |
Destruct the semaphore attributes object instance.
|
default |
|
default |
|
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.
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 150 of file os-semaphore.h.
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 145 of file os-semaphore.h.