18 #include "pandabase.h" 19 #include "mutexTrueImpl.h" 20 #include "conditionVarImpl.h" 33 class EXPCL_PANDA_PIPELINE MutexDebug :
public Namable {
35 MutexDebug(
const string &name,
bool allow_recursion,
bool lightweight);
36 virtual ~MutexDebug();
38 INLINE MutexDebug(
const MutexDebug ©);
39 INLINE
void operator = (
const MutexDebug ©);
44 INLINE
void elevate_lock()
const;
45 INLINE
void release()
const;
46 INLINE
bool debug_is_locked()
const;
48 virtual void output(ostream &out)
const;
49 void output_with_holder(ostream &out)
const;
51 typedef void VoidFunc();
54 static void increment_pstats();
55 static void decrement_pstats();
58 void do_acquire(
Thread *current_thread);
59 bool do_try_acquire(
Thread *current_thread);
61 bool do_debug_is_locked()
const;
63 void report_deadlock(
Thread *current_thread);
68 bool _allow_recursion;
76 MissedThreads _missed_threads;
78 ConditionVarImpl _cvar_impl;
80 static int _pstats_count;
83 friend class ConditionVarDebug;
84 friend class ConditionVarFullDebug;
88 operator << (ostream &out,
const MutexDebug &m) {
93 #include "mutexDebug.I" 95 #endif // DEBUG_THREADS This is our own Panda specialization on the default STL map.
void output(ostream &out) const
Outputs the Namable.
static Thread * get_current_thread()
Returns a pointer to the currently-executing Thread object.
A base class for all things which can have a name.
A thread; that is, a lightweight process.
A fake mutex implementation for single-threaded applications that don't need any synchronization cont...