unlock a recursive mutex
cc [options] -Kthread file
int rmutex_unlock(rmutex_t *rmutex);
rmutex_unlock unlocks the recursive mutual exclusion lock (rmutex)
pointed to by rmutex.
rmutex_unlock checks the identity of the caller
and if the caller is the current owner of rmutex
it checks the depth count.
If the depth count is greater than 0,
it decrements the count and returns to the caller
without unlocking the rmutex.
If the depth count is 0, the rmutex is unlocked.
If the caller is not the current owner of rmutex,
that is, the caller does not hold the lock,
rmutex_unlock will fail and return EACCES.
If there are one or more threads waiting for rmutex
when it is unlocked,
at least one waiting thread is
allowed to try again to lock rmutex.
If more than one thread is waiting, the choice of which to release from the
blocked group is scheduling-policy-specific:
Bound threads have priority over multiplexed threads; then
within each category the choice of thread is scheduling-policy-specific.
pointer to recursive mutex to be unlocked
rmutex_unlock returns zero for success
and an error number for failure.
If any of the following conditions is detected,
rmutex_unlock returns the corresponding value:
the caller did not previously lock the rmutex
invalid argument specified
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004