RTI Connext DDS Micro
Version 2.4.10
|
Mutex API. More...
Typedefs | |
typedef struct OSAPI_Mutex | OSAPI_Mutex_T |
Functions | |
RTI_BOOL | OSAPI_Mutex_delete (OSAPI_Mutex_T *mutex) |
Delete a mutex. | |
OSAPI_Mutex_T * | OSAPI_Mutex_new (void) |
Create a mutex. | |
RTI_BOOL | OSAPI_Mutex_take (OSAPI_Mutex_T *mutex) |
Take a mutex. | |
RTI_BOOL | OSAPI_Mutex_give (OSAPI_Mutex_T *mutex) |
Give a mutex. |
Mutex API.
typedef struct OSAPI_Mutex OSAPI_Mutex_T |
Abstract Mutex type
RTI_BOOL OSAPI_Mutex_delete | ( | OSAPI_Mutex_T * | mutex | ) |
Delete a mutex.
[in] | mutex | Delete a mutex created with OSAPI_Mutex_new. |
OSAPI_Mutex_T* OSAPI_Mutex_new | ( | void | ) |
Create a mutex.
RTI_BOOL OSAPI_Mutex_take | ( | OSAPI_Mutex_T * | mutex | ) |
Take a mutex.
A mutex can only be taken if it is not currently already taken by another thread; it CAN be taken if is it already taken by the same thread. In order to release a mutex, it must be given as many times a it has been taken. Note that take
will block indefinitely.
Note: the mutex is not required to support priority inversion; there is no protection against deadlocks or starvation.
[in] | mutex | Take a mutex previously created with OSAPI_Mutex_new. |
RTI_BOOL OSAPI_Mutex_give | ( | OSAPI_Mutex_T * | mutex | ) |
Give a mutex.
A mutex can only be given if it is owned by the calling thread. Furthermore, it must be given as many times as it has been taken.
[in] | mutex | Take a mutex previously created with OSAPI_Mutex_new. |