Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

clCondition Class Reference

Class implementation of POSIX condition variable. More...

#include <Condition.hh>

List of all members.

Public Member Functions

 clCondition ()
 Constructor; creates and initializes the condition variable.

 ~clCondition ()
 Destructor; destroys the condition variable.

bool Wait (pthread_mutex_t *pthmCond)
 Wait for condition to be signalled.

bool Wait (pthread_mutex_t *pthmCond, int iCondTO)
void Notify ()
 Signal condition variable.

void NotifyAll ()
 Signal condition variable.


Private Attributes

pthread_cond_t pthcCond


Detailed Description

Class implementation of POSIX condition variable.

Definition at line 40 of file Condition.hh.


Constructor & Destructor Documentation

clCondition::clCondition  )  [inline]
 

Constructor; creates and initializes the condition variable.

Definition at line 47 of file Condition.hh.

References pthcCond.

clCondition::~clCondition  )  [inline]
 

Destructor; destroys the condition variable.

Definition at line 51 of file Condition.hh.

References pthcCond.


Member Function Documentation

bool clCondition::Wait pthread_mutex_t *  pthmCond  )  [inline]
 

Wait for condition to be signalled.

Note:
Mutex must be locked before calling this. Mutex is freed for the waiting time and relocked on return.
Parameters:
pthmCond Pointer to mutex variable
Returns:
Success

Definition at line 61 of file Condition.hh.

References pthcCond.

bool clCondition::Wait pthread_mutex_t *  pthmCond,
int  iCondTO
[inline]
 

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Parameters:
pthmCond Pointer to mutex varibale
iCondTO Timeout in milliseconds
Returns:
Success

Definition at line 79 of file Condition.hh.

References pthcCond.

void clCondition::Notify  )  [inline]
 

Signal condition variable.

Mutex can be locked to achieve desired scheduling behaviour. Only single waiting thread is woken up.

Definition at line 102 of file Condition.hh.

References pthcCond.

void clCondition::NotifyAll  )  [inline]
 

Signal condition variable.

Mutex can be locked to achieve desired scheduling behaviour. All waiting threads are woken up.

Definition at line 109 of file Condition.hh.

References pthcCond.


Member Data Documentation

pthread_cond_t clCondition::pthcCond [private]
 

Definition at line 42 of file Condition.hh.

Referenced by clCondition(), Notify(), NotifyAll(), Wait(), and ~clCondition().


The documentation for this class was generated from the following file:
Generated on Tue Mar 2 19:47:06 2004 for libDSP by doxygen 1.3.6