30class EXPCL_PANDA_PIPELINE MutexDebug :
public Namable {
32 MutexDebug(
const std::string &name,
bool allow_recursion,
bool lightweight);
33 MutexDebug(
const MutexDebug ©) =
delete;
34 virtual ~MutexDebug();
36 void operator = (
const MutexDebug ©) =
delete;
40 INLINE
bool try_lock();
46 INLINE
void elevate_lock()
const;
47 INLINE
void release()
const;
48 INLINE
bool debug_is_locked()
const;
50 virtual void output(std::ostream &out)
const;
51 void output_with_holder(std::ostream &out)
const;
53 typedef void VoidFunc();
56 static void increment_pstats();
57 static void decrement_pstats();
60 void do_lock(Thread *current_thread);
61 bool do_try_lock(Thread *current_thread);
63 bool do_debug_is_locked()
const;
65 void report_deadlock(Thread *current_thread);
68 INLINE
static MutexTrueImpl *get_global_lock();
70 bool _allow_recursion;
72 Thread *_locking_thread;
77 typedef pmap<Thread *, int> MissedThreads;
78 MissedThreads _missed_threads;
80 ConditionVarImpl _cvar_impl;
82 static int _pstats_count;
83 static MutexTrueImpl *_global_lock;
85 friend class ConditionVarDebug;
86 friend class ConditionVarFullDebug;
90operator << (std::ostream &out,
const MutexDebug &m) {
A base class for all things which can have a name.
void output(std::ostream &out) const
Outputs the Namable.
get_current_thread
Returns a pointer to the currently-executing Thread object.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.