initialize a recursive mutex
cc [options] -Kthread file
int rmutex_init(rmutex_t *rmutex, int type, void *arg);
rmutex_init initializes the recursive mutual exclusion lock (rmutex)
pointed to by rmutex
to be of type type and in the unlocked state.
Once initialized, the rmutex can be used any number of times without
All operations on locks initialized with
rmutex_init are recursive.
pointer to recursive mutex to be initialized
USYNC_THREAD or USYNC_PROCESS
NULL (reserved for future use)
rmutex points to the rmutex to be initialized.
type can be set to one of the following values:
initialize the rmutex for threads within the current process
initialize the rmutex for threads across processes
arg should be set to NULL.
It is not currently used, but is reserved for future use.
Static recursive mutex initialization
An rmutex can be initialized statically
if its storage is zero-filled.
In this case, the rmutex is of type USYNC_THREAD,
and rmutex_init need not be called.
rmutex_init returns zero for success
and an error number for failure.
If the following condition is detected,
rmutex_init returns the corresponding value:
invalid argument specified
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004