DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Threads

Recursive mutual exclusion

The regular mutex lock (shown earlier) will deadlock the calling thread on attempts to re-lock a lock that it already holds. A recursive mutually exclusive lock (recursive mutex or rmutex) allows the holder of a lock to re-lock without deadlock; other threads will block normally.

   int rmutex_lock(  rmutex_t *rmutex);
   int rmutex_unlock(rmutex_t *rmutex);
Considerations for the use of recursive mutex locks:
Next topic: Reader-writer locks
Previous topic: Spin locks

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005