Portable recursive exclusive lock. More...
#include <thread.h>
Public Member Functions | |
unsigned | getLocking (void) |
Get the number of recursive locking levels. | |
unsigned | getWaiting (void) |
Get the number of threads waiting on lock. | |
bool | lock (timeout_t timeout) |
Timed lock request. | |
void | lock (void) |
Acquire or increase locking. | |
RecursiveMutex () | |
Create rexlock. | |
void | release (void) |
Release or decrease locking. | |
Static Public Member Functions | |
static void | lock (RecursiveMutex &rex) |
Convenience method to lock a recursive lock. | |
static void | release (RecursiveMutex &rex) |
Convenience method to unlock a recursive lock. | |
Protected Member Functions | |
void | Exlock (void) |
Protocol interface to exclusive lock the object. | |
void | Unlock (void) |
Protocol interface to release a lock. | |
Protected Attributes | |
pthread_t | locker |
unsigned | lockers |
unsigned | waiting |
Portable recursive exclusive lock.
This class is built from the conditional and hence does not require support for non-standard and platform specific extensions to pthread mutex to support recrusive style mutex locking. The exclusive protocol is implimented to support exclusive_lock referencing.
Definition at line 477 of file thread.h.
unsigned ucommon::RecursiveMutex::getLocking | ( | void | ) |
Get the number of recursive locking levels.
unsigned ucommon::RecursiveMutex::getWaiting | ( | void | ) |
Get the number of threads waiting on lock.
static void ucommon::RecursiveMutex::lock | ( | RecursiveMutex & | rex | ) | [inline, static] |
static void ucommon::RecursiveMutex::release | ( | RecursiveMutex & | rex | ) | [inline, static] |