|
ucommon
|
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. | |
| void | lock (void) |
| Acquire or increase locking. | |
| bool | lock (timeout_t timeout) |
| Timed lock request. | |
| 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.
| 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] |
1.7.6.1