Semaphore-related C-API of distortos.
More...
|
#define | DISTORTOS_SEMAPHORE_INITIALIZER(self, value, maxValue) {ESTD_INTRUSIVELIST_INITIALIZER((self).blockedList), (value) < (maxValue) ? (value) : (maxValue), (maxValue)} |
| Initializer for distortos_Semaphore. More...
|
|
#define | DISTORTOS_SEMAPHORE_CONSTRUCT_1(name, value, maxValue) struct distortos_Semaphore name = DISTORTOS_SEMAPHORE_INITIALIZER(name, value, maxValue) |
| C-API equivalent of distortos::Semaphore's constructor. More...
|
|
#define | DISTORTOS_SEMAPHORE_CONSTRUCT(name, value) DISTORTOS_SEMAPHORE_CONSTRUCT_1(name, value, UINT_MAX) |
| C-API equivalent of distortos::Semaphore's constructor, maxValue == UINT_MAX. More...
|
|
Semaphore-related C-API of distortos.
◆ DISTORTOS_SEMAPHORE_CONSTRUCT
C-API equivalent of distortos::Semaphore's constructor, maxValue == UINT_MAX.
- See also
- distortos::Semaphore::Semaphore()
- Parameters
-
[in] | name | is the name of the object that will be instantiated |
[in] | value | is the initial value of the semaphore, if this value is greater than UINT_MAX, it will be truncated |
◆ DISTORTOS_SEMAPHORE_CONSTRUCT_1
C-API equivalent of distortos::Semaphore's constructor.
- See also
- distortos::Semaphore::Semaphore()
- Parameters
-
[in] | name | is the name of the object that will be instantiated |
[in] | value | is the initial value of the semaphore, if this value is greater than maxValue, it will be truncated |
[in] | maxValue | is the max value of the semaphore before post() returns EOVERFLOW |
◆ DISTORTOS_SEMAPHORE_INITIALIZER
#define DISTORTOS_SEMAPHORE_INITIALIZER |
( |
|
self, |
|
|
|
value, |
|
|
|
maxValue |
|
) |
| {ESTD_INTRUSIVELIST_INITIALIZER((self).blockedList), (value) < (maxValue) ? (value) : (maxValue), (maxValue)} |
Initializer for distortos_Semaphore.
- See also
- distortos::Semaphore::Semaphore()
- Parameters
-
[in] | self | is an equivalent of this hidden argument |
[in] | value | is the initial value of the semaphore, if this value is greater than maxValue, it will be truncated |
[in] | maxValue | is the max value of the semaphore before post() returns EOVERFLOW |
◆ distortos_Semaphore_construct()
static int distortos_Semaphore_construct |
( |
struct distortos_Semaphore *const |
semaphore, |
|
|
const unsigned int |
value |
|
) |
| |
|
inlinestatic |
◆ distortos_Semaphore_construct_1()
int distortos_Semaphore_construct_1 |
( |
struct distortos_Semaphore * |
semaphore, |
|
|
unsigned int |
value, |
|
|
unsigned int |
maxValue |
|
) |
| |
◆ distortos_Semaphore_destruct()
◆ distortos_Semaphore_getMaxValue()
int distortos_Semaphore_getMaxValue |
( |
const struct distortos_Semaphore * |
semaphore, |
|
|
unsigned int * |
maxValue |
|
) |
| |
◆ distortos_Semaphore_getValue()
int distortos_Semaphore_getValue |
( |
const struct distortos_Semaphore * |
semaphore, |
|
|
unsigned int * |
value |
|
) |
| |
◆ distortos_Semaphore_post()
◆ distortos_Semaphore_tryWait()
◆ distortos_Semaphore_tryWaitFor()
int distortos_Semaphore_tryWaitFor |
( |
struct distortos_Semaphore * |
semaphore, |
|
|
int64_t |
duration |
|
) |
| |
◆ distortos_Semaphore_tryWaitUntil()
int distortos_Semaphore_tryWaitUntil |
( |
struct distortos_Semaphore * |
semaphore, |
|
|
int64_t |
timePoint |
|
) |
| |
◆ distortos_Semaphore_wait()