static bool MutexAttrInitialized_
Definition: Mutex.h:44
An implementation of RAII for the Mutex.
Definition: Mutex.h:76
static pthread_mutexattr_t MutexAttr_
Definition: Mutex.h:43
bool tryLock()
Returns true if able to lock the mutex, false if already locked.
Definition: Mutex.cpp:67
Mutex()
Constructor initializes the mutex.
Definition: Mutex.cpp:17
int broadcast()
Definition: Mutex.cpp:101
int timedWait(const Timespan &waitFor)
Definition: Mutex.cpp:89
int signal()
Definition: Mutex.cpp:96
int unlock()
Unlock the mutex.
Definition: Mutex.cpp:51
A simple pthread Mutex abstraction.
Definition: Mutex.h:20
Timespan class, represents a delta of time.
Definition: Timestamp.h:248
pthread_mutex_t mutex_
The Mutex itself.
Definition: Mutex.h:42
Mutex & mutex_
Reference to keep track of the Mutex.
Definition: Mutex.h:88
ThreadCondition(Mutex &mutex)
Definition: Mutex.cpp:78
int wait()
Definition: Mutex.cpp:84
MutexLocker(Mutex &mutex)
Constructor "creates" a lock on the mutex.
Definition: Mutex.cpp:107
pthread_cond_t condition_
Definition: Mutex.h:67
A simple pthread thread condition wrapper.
Definition: Mutex.h:53
Contains the Timestamp and Timespan class declarations.
~MutexLocker()
Destructor "destroys" the lock on the mutex.
Definition: Mutex.cpp:114
int lock()
Lock the mutex.
Definition: Mutex.cpp:34
Mutex & mutex_
Definition: Mutex.h:68