|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Wrapper class for POSIX condition variables. More...
#include <useCondVar.H>
Public Member Functions | |
| UseCondVar (pthread_cond_t *c, pthread_mutex_t *m) | |
| Construct wrapper for condition variable and mutex. | |
| int | wait () |
| Wait for the condition variable to be signaled. | |
| int | signal () |
| Signal one waiting thread. | |
| int | broadcast () |
| Wake all waiting threads. | |
| ~UseCondVar () | |
| Destructor (does not destroy the condition variable) | |
Private Attributes | |
| pthread_cond_t * | cond |
| pthread_mutex_t * | mutex |
Wrapper class for POSIX condition variables.
Provides a simple interface for pthread condition variable operations. Does not own the condition variable or mutex - they must be managed separately. *
Definition at line 101 of file useCondVar.H.
|
inline |
Destructor (does not destroy the condition variable)
Definition at line 166 of file useCondVar.H.
|
inline |
Wake all waiting threads.
Definition at line 159 of file useCondVar.H.
References cond.
|
inline |
Signal one waiting thread.
Definition at line 147 of file useCondVar.H.
References cond.
|
inline |
Wait for the condition variable to be signaled.
Definition at line 135 of file useCondVar.H.
|
private |
Definition at line 105 of file useCondVar.H.
Referenced by UseCondVar(), broadcast(), signal(), and wait().
|
private |
Definition at line 106 of file useCondVar.H.
Referenced by UseCondVar(), and wait().