Equalizer  1.2.1
Public Member Functions
co::base::Condition Class Reference

A condition variable and associated lock. More...

#include <condition.h>

List of all members.

Public Member Functions

COBASE_API Condition ()
 Construct a new condition variable.
COBASE_API ~Condition ()
 Destruct this condition variable.
COBASE_API void lock ()
 Lock the mutex.
COBASE_API void unlock ()
 Unlock the mutex.
COBASE_API void signal ()
 Signal the condition.
COBASE_API void broadcast ()
 Broadcast the condition.
COBASE_API void wait ()
 Atomically unlock the mutex, wait for a signal and relock the mutex.
COBASE_API bool timedWait (const uint32_t timeout)
 Atomically unlock the mutex, wait for a signal and relock the mutex.

Detailed Description

A condition variable and associated lock.

Follows closely pthread_condition and mutex

Definition at line 35 of file condition.h.


Constructor & Destructor Documentation

Construct a new condition variable.

Version:
1.0

Destruct this condition variable.

Version:
1.0

Member Function Documentation

COBASE_API void co::base::Condition::broadcast ( )

Broadcast the condition.

Version:
1.0

Referenced by co::base::Monitor< State >::operator++(), co::base::Monitor< State >::operator--(), co::base::Monitor< State >::operator|=(), and co::base::Monitor< State >::set().

+ Here is the caller graph for this function:

COBASE_API void co::base::Condition::lock ( )
COBASE_API void co::base::Condition::signal ( )
COBASE_API bool co::base::Condition::timedWait ( const uint32_t  timeout)

Atomically unlock the mutex, wait for a signal and relock the mutex.

The operation is aborted after the given timeout and false is returned.

Parameters:
timeoutthe timeout in milliseconds to wait for the signal.
Returns:
true on success, false on timeout.
Version:
1.0

Referenced by co::base::MTQueue< const void * >::timedPop(), co::base::Monitor< State >::timedWaitEQ(), and co::base::Monitor< State >::timedWaitGE().

+ Here is the caller graph for this function:

COBASE_API void co::base::Condition::unlock ( )
COBASE_API void co::base::Condition::wait ( )

The documentation for this class was generated from the following file:
Generated on Fri Jun 8 2012 15:44:34 for Equalizer 1.2.1 by  doxygen 1.8.0