//////////////////////////////////////////////////////////////////////// // class CCond // // $Log: cond.h,v $ // Revision 1.2 1997/07/23 18:32:06 nettleto // Added void prefix. // // Revision 1.1 1997/06/13 18:11:30 nettleto // Initial revision // // #ifndef COND_H #define COND_H #include "thread.h" #include "mutex.h" class CCond { protected: // attributes pthread_cond_t c; public: // Constructors, destructors CCond () { pthread_cond_init (&c, NULL); } ~CCond () { pthread_cond_destroy (&c); } // Operations void Broadcast () { pthread_cond_broadcast (&c); } void Signal () { pthread_cond_signal (&c); } void Timed_Wait (CMutex *m, struct timespec *abstime) { pthread_cond_timedwait (&c, &(m->m), abstime); } void Wait (CMutex *m) { pthread_cond_wait (&c, &m->m); } }; #endif // COND_H