00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CONDITIONVARPOSIXIMPL_H
00016 #define CONDITIONVARPOSIXIMPL_H
00017
00018 #include "pandabase.h"
00019 #include "selectThreadImpl.h"
00020
00021 #ifdef HAVE_POSIX_THREADS
00022
00023 #include "mutexPosixImpl.h"
00024 #include "pnotify.h"
00025 #include "config_pipeline.h"
00026
00027 #include <pthread.h>
00028
00029 class MutexPosixImpl;
00030
00031
00032
00033
00034
00035 class EXPCL_PANDA_PIPELINE ConditionVarPosixImpl {
00036 public:
00037 INLINE ConditionVarPosixImpl(MutexPosixImpl &mutex);
00038 INLINE ~ConditionVarPosixImpl();
00039
00040 INLINE void wait();
00041 void wait(double timeout);
00042 INLINE void notify();
00043 INLINE void notify_all();
00044
00045 private:
00046 MutexPosixImpl &_mutex;
00047 pthread_cond_t _cvar;
00048 };
00049
00050 #include "conditionVarPosixImpl.I"
00051
00052 #endif // HAVE_POSIX_THREADS
00053
00054 #endif