#include <mutex.h>
Public Member Functions | |
Condition () | |
~Condition () | |
void | signal () |
Wake up one process waiting on the condition. | |
void | broadcast () |
Wake up all processes waiting on the condition. | |
void | wait (MutexLock &l) |
Wait on the condition, locking with l. | |
void | wait (Mutex &l) |
bool | wait (MutexLock &l, const struct timespec &abstime) |
Wait on the condition, locking with l. | |
Protected Attributes | |
pthread_cond_t | cond |
wibble::sys::Condition::Condition | ( | ) | [inline] |
References cond.
wibble::sys::Condition::~Condition | ( | ) | [inline] |
References cond.
void wibble::sys::Condition::broadcast | ( | ) | [inline] |
Wake up all processes waiting on the condition.
References cond.
void wibble::sys::Condition::signal | ( | ) | [inline] |
Wake up one process waiting on the condition.
References cond.
bool wibble::sys::Condition::wait | ( | MutexLock & | l, | |
const struct timespec & | abstime | |||
) |
Wait on the condition, locking with l.
l is unlocked before waiting and locked again before returning. If the time abstime is reached before the condition is signaled, then l is locked and the function returns false.
References cond, wibble::sys::Mutex::mutex, and wibble::sys::MutexLockT< Mutex >::mutex.
void wibble::sys::Condition::wait | ( | Mutex & | l | ) | [inline] |
References cond, and wibble::sys::Mutex::mutex.
void wibble::sys::Condition::wait | ( | MutexLock & | l | ) | [inline] |
Wait on the condition, locking with l.
l is unlocked before waiting and locked again before returning.
References cond, wibble::sys::Mutex::mutex, and wibble::sys::MutexLockT< Mutex >::mutex.
pthread_cond_t wibble::sys::Condition::cond [protected] |
Referenced by broadcast(), Condition(), signal(), wait(), and ~Condition().