00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef CONDITIONVARDEBUG_H
00016 #define CONDITIONVARDEBUG_H
00017
00018 #include "pandabase.h"
00019 #include "pmutex.h"
00020 #include "conditionVarImpl.h"
00021
00022 #ifdef DEBUG_THREADS
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 class EXPCL_PANDA_PIPELINE ConditionVarDebug {
00037 public:
00038 ConditionVarDebug(MutexDebug &mutex);
00039 virtual ~ConditionVarDebug();
00040 private:
00041 INLINE ConditionVarDebug(const ConditionVarDebug ©);
00042 INLINE void operator = (const ConditionVarDebug ©);
00043
00044 PUBLISHED:
00045 INLINE MutexDebug &get_mutex() const;
00046
00047 BLOCKING void wait();
00048 BLOCKING void wait(double timeout);
00049 void notify();
00050 virtual void output(ostream &out) const;
00051
00052 private:
00053 MutexDebug &_mutex;
00054 ConditionVarImpl _impl;
00055 };
00056
00057 INLINE ostream &
00058 operator << (ostream &out, const ConditionVarDebug &cv) {
00059 cv.output(out);
00060 return out;
00061 }
00062
00063 #include "conditionVarDebug.I"
00064
00065 #endif // DEBUG_THREADS
00066
00067 #endif