Panda3D
conditionVar.I
Go to the documentation of this file.
1 /**
2  * PANDA 3D SOFTWARE
3  * Copyright (c) Carnegie Mellon University. All rights reserved.
4  *
5  * All use of this software is subject to the terms of the revised BSD
6  * license. You should have received a copy of this license along
7  * with this source code in a file named "LICENSE."
8  *
9  * @file conditionVar.I
10  * @author drose
11  * @date 2002-08-09
12  */
13 
14 /**
15  * You must pass in a Mutex to the condition variable constructor. This mutex
16  * may be shared by other condition variables, if desired. It is the caller's
17  * responsibility to ensure the Mutex object does not destruct during the
18  * lifetime of the condition variable.
19  */
20 INLINE ConditionVar::
22 #ifdef DEBUG_THREADS
23  ConditionVarDebug(mutex)
24 #else
25  ConditionVarDirect(mutex)
26 #endif // DEBUG_THREADS
27 {
28 }
29 
30 /**
31  * Returns the mutex associated with this condition variable.
32  */
33 INLINE Mutex &ConditionVar::
34 get_mutex() const {
35 #ifdef DEBUG_THREADS
36  return (Mutex &)ConditionVarDebug::get_mutex();
37 #else
39 #endif // DEBUG_THREADS
40 }
A standard mutex, or mutual exclusion lock.
Definition: pmutex.h:38
ConditionVar(Mutex &mutex)
You must pass in a Mutex to the condition variable constructor.
Definition: conditionVar.I:21
MutexDirect & get_mutex() const
Returns the mutex associated with this condition variable.
A condition variable, usually used to communicate information about changing state to a thread that i...
Mutex & get_mutex() const
Returns the mutex associated with this condition variable.
Definition: conditionVar.I:34