#ifndef _condition_var_h #define _condition_var_h #include class ConditionVariable { public: // Constructors ConditionVariable(); // For portability reasons, this constructor is // not being provided. Besides, there is really // not much you can customize here. // Custom constructor // ConditionVariable(pthread_condattr_t attribute); ~ConditionVariable(); // These functions return 0 on success and -1 on // failure int Wait(void); int Signal(void); private: pthread_cond_t cond_var; // There is a mutex associated with a condition variable pthread_mutex_t mutex_var; }; #endif