Panda3D
lightMutex.I
1 // Filename: lightMutex.I
2 // Created by: drose (08Oct08)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: LightMutex::Constructor
18 // Access: Published
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE LightMutex::
22 #ifdef DEBUG_THREADS
23 LightMutex() : MutexDebug(string(), false, true)
24 #else
25 LightMutex()
26 #endif // DEBUG_THREADS
27 {
28 }
29 
30 ////////////////////////////////////////////////////////////////////
31 // Function: LightMutex::Constructor
32 // Access: Public
33 // Description:
34 ////////////////////////////////////////////////////////////////////
35 INLINE LightMutex::
36 #ifdef DEBUG_THREADS
37 LightMutex(const char *name) : MutexDebug(string(name), false, true)
38 #else
39 LightMutex(const char *)
40 #endif // DEBUG_THREADS
41 {
42 }
43 
44 ////////////////////////////////////////////////////////////////////
45 // Function: LightMutex::Constructor
46 // Access: Published
47 // Description:
48 ////////////////////////////////////////////////////////////////////
49 INLINE LightMutex::
50 #ifdef DEBUG_THREADS
51 LightMutex(const string &name) : MutexDebug(name, false, true)
52 #else
53 LightMutex(const string &)
54 #endif // DEBUG_THREADS
55 {
56 }
57 
58 ////////////////////////////////////////////////////////////////////
59 // Function: LightMutex::Destructor
60 // Access: Published
61 // Description:
62 ////////////////////////////////////////////////////////////////////
63 INLINE LightMutex::
64 ~LightMutex() {
65 }
66 
67 ////////////////////////////////////////////////////////////////////
68 // Function: LightMutex::Copy Constructor
69 // Access: Private
70 // Description: Do not attempt to copy lightMutexes.
71 ////////////////////////////////////////////////////////////////////
72 INLINE LightMutex::
73 #ifdef DEBUG_THREADS
74 LightMutex(const LightMutex &copy) : MutexDebug(string(), false, true)
75 #else
76  LightMutex(const LightMutex &copy)
77 #endif // DEBUG_THREADS
78 {
79  nassertv(false);
80 }
81 
82 ////////////////////////////////////////////////////////////////////
83 // Function: LightMutex::Copy Assignment Operator
84 // Access: Private
85 // Description: Do not attempt to copy lightMutexes.
86 ////////////////////////////////////////////////////////////////////
87 INLINE void LightMutex::
88 operator = (const LightMutex &copy) {
89  nassertv(false);
90 }
This is a standard, non-reentrant mutex, similar to the Mutex class.
Definition: lightMutex.h:45