rtapi_mutex — Mutex-related functions
int rtapi_mutex_try ( unsigned long *mutex )
void rtapi_mutex_get ( unsigned long *mutex )
void rtapi_mutex_give ( unsigned long *mutex )
A pointer to the mutex.
makes a non-blocking attempt to get the mutex.
If the mutex is available, it returns 0, and the mutex is no longer available.
Otherwise, it returns a nonzero value.
blocks until the mutex is available.
releases a mutex acquired by rtapi_mutex_try or rtapi_mutex_get.
rtapi_mutex_give and rtapi_mutex_try may be used from user, init/cleanup, and realtime code.
rtapi_mutex_get may not be used from realtime code.
rtapi_mutex_try returns 0 for if the mutex was claimed, and nonzero otherwise.
rtapi_mutex_get and rtapi_mutex_give have no return value.