|
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. | |
Public Member Functions inherited from ucommon::ExclusiveProtocol | |
| void | Lock (void) |
| A convenience member function for accessing the exclusive lock. | |
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 |
Additional Inherited Members | |
Static Private Member Functions inherited from ucommon::Conditional | |
| static void | gettimeout (timeout_t timeout, struct timespec *hires) |
| Convert a millisecond timeout into use for high resolution conditional timers. | |
| static pthread_condattr_t * | initializer (void) |
| Support function for getting conditional attributes for realtime scheduling. | |
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.
|
inlinestatic |
|
inlinestatic |
1.8.1.1