wibble::sys::Condition Class Reference

#include <mutex.h>

List of all members.

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


Constructor & Destructor Documentation

wibble::sys::Condition::Condition (  )  [inline]

References cond.

wibble::sys::Condition::~Condition (  )  [inline]

References cond.


Member Function Documentation

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.

Returns:
true if the wait succeeded, or false if the timeout was reached before the condition is signaled.

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.

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.


Member Data Documentation

pthread_cond_t wibble::sys::Condition::cond [protected]


The documentation for this class was generated from the following files:

Generated on Fri Jun 12 05:23:28 2009 for wibble by  doxygen 1.5.9