#include <Mutex.h>
Public Member Functions | |
| CondVar (int value=0) | |
| ~CondVar () | |
| int | Wait (Mutex &mutex) |
| int | Signal () |
| void | SetValue (int value) |
| int | GetValue () |
Private Member Functions | |
| CondVar (const CondVar &) | |
| CondVar & | operator= (const CondVar &) |
Private Attributes | |
| pthread_cond_t | fCond |
| int | fValue |
|
|
Definition at line 156 of file Mutex.h. References fCond. 00157 :fValue(value) 00158 { 00159 const int status_init = pthread_cond_init(&fCond, NULL); 00160 assert(status_init == 0 && "pthread_cond_init() failed"); 00161 }
|
|
|
Definition at line 163 of file Mutex.h. References fCond. 00164 {
00165 const int status_destroy = pthread_cond_destroy(&fCond);
00166 assert(status_destroy == 0 && "pthread_cond_destroy() failed");
00167 }
|
|
|
|
|
|
Definition at line 184 of file Mutex.h. Referenced by Anp::RunAlgSnarl::Run(), and Anp::RunAlgSnarl::RunRecord(). 00184 { return fValue; }
|
|
|
|
|
|
Definition at line 183 of file Mutex.h. References fValue. Referenced by Anp::RunAlgSnarl::End(), and Anp::RunAlgSnarl::Run(). 00183 { fValue = value; }
|
|
|
Definition at line 176 of file Mutex.h. References fCond. Referenced by Anp::RunAlgSnarl::End(), and Anp::RunAlgSnarl::Run(). 00177 {
00178 const int status_signal = pthread_cond_signal(&fCond);
00179 assert(status_signal == 0 && "pthread_cond_signal() failed");
00180 return status_signal;
00181 }
|
|
|
Definition at line 169 of file Mutex.h. References fCond, and Anp::Mutex::get_pthread_mutex(). Referenced by Anp::RunAlgSnarl::Run(). 00170 {
00171 const int status_wait = pthread_cond_wait(&fCond, mutex.get_pthread_mutex());
00172 assert(status_wait == 0 && "pthread_cond_wait() failed");
00173 return status_wait;
00174 }
|
|
|
Definition at line 109 of file Mutex.h. Referenced by CondVar(), Signal(), Wait(), and ~CondVar(). |
|
|
Definition at line 110 of file Mutex.h. Referenced by SetValue(). |
1.3.9.1