Main Page | Namespace List | Class Hierarchy | Compound List | File List | Namespace Members | Compound Members | File Members | Related Pages

Condition Class Reference

#include <Condition.hpp>

List of all members.

Public Member Functions

 Condition ()
void wait ()
void signal ()

Private Attributes

volatile bool cond
pthread_mutex_t condLock
pthread_cond_t condCond


Detailed Description

Condition - Used to synchronize threads.

One thread waits for the condition to become true. Another thread signals when the condition becomes true. After the waiting thread is released, it sets the condition value to false.

Author:
Andrei Goldchleger
Date:
December, 2003


Constructor & Destructor Documentation

Condition::Condition  ) 
 

Creates a Condition object


Member Function Documentation

void Condition::signal  ) 
 

Makes the condition true and signal the situation to a blocked thread, if any.

void Condition::wait  ) 
 

Blocks the calling thread until the condition becomes true


Member Data Documentation

volatile bool Condition::cond [private]
 

the condition flag

pthread_cond_t Condition::condCond [private]
 

condition variable

pthread_mutex_t Condition::condLock [private]
 

lock for the critical section


The documentation for this class was generated from the following files:
Generated on Mon Sep 6 16:13:10 2004 by doxygen 1.3.3