#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::signal | ( | ) | [inline] |
| void wibble::sys::Condition::broadcast | ( | ) | [inline] |
| 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::MutexLock::mutex.
| void wibble::sys::Condition::wait | ( | Mutex & | l | ) | [inline] |
References cond, and wibble::sys::Mutex::mutex.
| 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::MutexLock::mutex.
pthread_cond_t wibble::sys::Condition::cond [protected] |
Referenced by broadcast(), Condition(), signal(), wait(), and ~Condition().
1.5.6