Panda3D

Loading...
Searching...
No Matches
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 */
20INLINE ConditionVar::
21 ConditionVar(Mutex &mutex) :
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 */
33INLINE Mutex &ConditionVar::
34 get_mutex() const {
35#ifdef DEBUG_THREADS
36 return (Mutex &)ConditionVarDebug::get_mutex();
37#else
38 return (Mutex &)ConditionVarDirect::get_mutex();
39#endif // DEBUG_THREADS
40}
ConditionVarDirect::get_mutex
MutexDirect & get_mutex() const
Returns the mutex associated with this condition variable.
Definition conditionVarDirect.I:31
ConditionVarDirect::ConditionVarDirect
ConditionVarDirect(MutexDirect &mutex)
You must pass in a Mutex to the condition variable constructor.
Definition conditionVarDirect.I:21
ConditionVar::get_mutex
Mutex & get_mutex() const
Returns the mutex associated with this condition variable.
Definition conditionVar.I:34
ConditionVar::ConditionVar
ConditionVar(Mutex &mutex)
You must pass in a Mutex to the condition variable constructor.
Definition conditionVar.I:21
Mutex
A standard mutex, or mutual exclusion lock.
Definition pmutex.h:40