Xenomai
3.0.5
|
Functions | |
void | rtdm_mutex_init (rtdm_mutex_t *mutex) |
Initialise a mutex. More... | |
void | rtdm_mutex_destroy (rtdm_mutex_t *mutex) |
Destroy a mutex. More... | |
void | rtdm_mutex_unlock (rtdm_mutex_t *mutex) |
Release a mutex. More... | |
int | rtdm_mutex_lock (rtdm_mutex_t *mutex) |
Request a mutex. More... | |
int | rtdm_mutex_timedlock (rtdm_mutex_t *mutex, nanosecs_rel_t timeout, rtdm_toseq_t *timeout_seq) |
Request a mutex with timeout. More... | |
void rtdm_mutex_destroy | ( | rtdm_mutex_t * | mutex | ) |
Destroy a mutex.
[in,out] | mutex | Mutex handle as returned by rtdm_mutex_init() |
References XNRMID.
void rtdm_mutex_init | ( | rtdm_mutex_t * | mutex | ) |
Initialise a mutex.
This function initalises a basic mutex with priority inversion protection. "Basic", as it does not allow a mutex owner to recursively lock the same mutex again.
[in,out] | mutex | Mutex handle |
int rtdm_mutex_lock | ( | rtdm_mutex_t * | mutex | ) |
Request a mutex.
This is the light-weight version of rtdm_mutex_timedlock(), implying an infinite timeout.
[in,out] | mutex | Mutex handle as returned by rtdm_mutex_init() |
References rtdm_mutex_timedlock().
int rtdm_mutex_timedlock | ( | rtdm_mutex_t * | mutex, |
nanosecs_rel_t | timeout, | ||
rtdm_toseq_t * | timeout_seq | ||
) |
Request a mutex with timeout.
This function tries to acquire the given mutex. If it is not available, the caller is blocked unless non-blocking operation was selected.
[in,out] | mutex | Mutex handle as returned by rtdm_mutex_init() |
[in] | timeout | Relative timeout in nanoseconds, see RTDM_TIMEOUT_xxx for special values |
[in,out] | timeout_seq | Handle of a timeout sequence as returned by rtdm_toseq_init() or NULL |
Referenced by rtdm_mutex_lock().
void rtdm_mutex_unlock | ( | rtdm_mutex_t * | mutex | ) |
Release a mutex.
This function releases the given mutex, waking up a potential waiter which was blocked upon rtdm_mutex_lock() or rtdm_mutex_timedlock().
[in,out] | mutex | Mutex handle as returned by rtdm_mutex_init() |