#include <ReentrantLock.h>
A reentrant lock.
Definition at line 55 of file ReentrantLock.h.
| Sync::ReentrantLock::ReentrantLock |
( |
| ) |
|
|
inline |
Definition at line 57 of file ReentrantLock.h.
References ENSURE, and lock.
58 pthread_mutexattr_t attr;
59 pthread_mutexattr_init(&attr);
60 pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
62 pthread_mutexattr_destroy(&attr);
| Sync::ReentrantLock::~ReentrantLock |
( |
| ) |
|
|
inline |
| void Sync::ReentrantLock::Lock |
( |
void |
| ) |
const |
|
inline |
Definition at line 83 of file ReentrantLock.h.
References ENSURE_ABORT, and lock.
85 double start = Internal::getTime();
89 double time = Internal::getTime();
90 if (lock_count == 0) {
94 wait_time += time - start;
#define ENSURE_ABORT(exp,...)
| void Sync::ReentrantLock::Unlock |
( |
void |
| ) |
const |
|
inline |
Definition at line 73 of file ReentrantLock.h.
References ENSURE_ABORT, and lock.
76 if (lock_count == 0) {
77 lock_time += Internal::getTime() - lock_last;
#define ENSURE_ABORT(exp,...)
| pthread_mutex_t Sync::ReentrantLock::lock |
|
mutableprivate |
The documentation for this class was generated from the following file: