30 class 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();
44 BLOCKING INLINE
void acquire(
Thread *current_thread = Thread::get_current_thread())
const;
45 BLOCKING INLINE
bool try_acquire(
Thread *current_thread = Thread::get_current_thread())
const;
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);
70 bool _allow_recursion;
78 MissedThreads _missed_threads;
80 ConditionVarImpl _cvar_impl;
82 static int _pstats_count;
85 friend class ConditionVarDebug;
86 friend class ConditionVarFullDebug;
90 operator << (std::ostream &out,
const MutexDebug &m) {
97 #endif // DEBUG_THREADS PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
This is our own Panda specialization on the default STL map.
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.
void output(std::ostream &out) const
Outputs the Namable.
A base class for all things which can have a name.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
A thread; that is, a lightweight process.
A fake mutex implementation for single-threaded applications that don't need any synchronization cont...
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.