rtapi_mutex - Mutex-related functions
Contents
Arguments
mutex A pointer to the mutex.
Description
rtapi_mutex_try 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.
rtapi_mutex_get blocks until the mutex is available.
rtapi_mutex_give releases a mutex acquired by rtapi_mutex_try or rtapi_mutex_get.
Name
rtapi_mutex - Mutex-related functions
Realtime Considerations
rtapi_mutex_give and rtapi_mutex_try may be used from non-realtime, init/cleanup, and realtime code.
rtapi_mutex_get may not be used from realtime code.
Return Value
rtapi_mutex_try returns 0 for if the mutex was claimed, and nonzero otherwise.
rtapi_mutex_get and rtapi_mutex_gif have no return value.
LinuxCNC Documentation 2006-10-12 rtapi_mutex(3rtapi)
Syntax
#include<rtapi_mutex.h>intrtapi_mutex_try(unsignedlong*mutex);intrtapi_mutex_get(unsignedlong*mutex);intrtapi_mutex_give(unsignedlong*mutex);
