mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 08:44:19 -04:00
forgot to check this in
This commit is contained in:
parent
5bdb3e695f
commit
f63bf2526a
@ -26,6 +26,25 @@ MutexHolder(const Mutex &mutex) {
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: MutexHolder::Constructor
|
||||
// Access: Public
|
||||
// Description: This variant on the constructor accepts the current
|
||||
// thread as a parameter, if it is already known, as an
|
||||
// optimization.
|
||||
////////////////////////////////////////////////////////////////////
|
||||
INLINE MutexHolder::
|
||||
MutexHolder(const Mutex &mutex, Thread *current_thread) {
|
||||
#if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
|
||||
_mutex = &mutex;
|
||||
// Actually, the regular Mutex class doesn't need the current thread
|
||||
// parameter at the moment. So not actually an optimization. But
|
||||
// we keep this method because it causes a symmetry with
|
||||
// ReMutexHolder.
|
||||
_mutex->acquire(/*current_thread*/);
|
||||
#endif
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
// Function: MutexHolder::Constructor
|
||||
// Access: Public
|
||||
|
@ -29,6 +29,7 @@
|
||||
class EXPCL_PANDA_PIPELINE MutexHolder {
|
||||
public:
|
||||
INLINE MutexHolder(const Mutex &mutex);
|
||||
INLINE MutexHolder(const Mutex &mutex, Thread *current_thread);
|
||||
INLINE MutexHolder(Mutex *&mutex);
|
||||
INLINE ~MutexHolder();
|
||||
private:
|
||||
|
Loading…
x
Reference in New Issue
Block a user