00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CONDITIONVARSIMPLEIMPL_H
00016 #define CONDITIONVARSIMPLEIMPL_H
00017
00018 #include "pandabase.h"
00019 #include "selectThreadImpl.h"
00020
00021 #ifdef THREAD_SIMPLE_IMPL
00022
00023 #include "blockerSimple.h"
00024 #include "mutexTrueImpl.h"
00025
00026
00027
00028
00029
00030
00031 class EXPCL_PANDA_PIPELINE ConditionVarSimpleImpl : public BlockerSimple {
00032 public:
00033 INLINE ConditionVarSimpleImpl(MutexTrueImpl &mutex);
00034 INLINE ~ConditionVarSimpleImpl();
00035
00036 void wait();
00037 void wait(double timeout);
00038 INLINE void notify();
00039 INLINE void notify_all();
00040
00041 private:
00042 void do_notify();
00043 void do_notify_all();
00044
00045 MutexTrueImpl &_mutex;
00046 };
00047
00048 #include "conditionVarSimpleImpl.I"
00049
00050 #endif // THREAD_SIMPLE_IMPL
00051
00052 #endif