Panda3D
 All Classes Functions Variables Enumerations
pmutex.I
1 // Filename: pmutex.I
2 // Created by: drose (08Aug02)
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: Mutex::Constructor
18 // Access: Published
19 // Description:
20 ////////////////////////////////////////////////////////////////////
21 INLINE Mutex::
22 #ifdef DEBUG_THREADS
23 Mutex() : MutexDebug(string(), false, false)
24 #else
25 Mutex()
26 #endif // DEBUG_THREADS
27 {
28 }
29 
30 ////////////////////////////////////////////////////////////////////
31 // Function: Mutex::Constructor
32 // Access: Public
33 // Description:
34 ////////////////////////////////////////////////////////////////////
35 INLINE Mutex::
36 #ifdef DEBUG_THREADS
37 Mutex(const char *name) : MutexDebug(string(name), false, false)
38 #else
39 Mutex(const char *)
40 #endif // DEBUG_THREADS
41 {
42 }
43 
44 ////////////////////////////////////////////////////////////////////
45 // Function: Mutex::Constructor
46 // Access: Published
47 // Description:
48 ////////////////////////////////////////////////////////////////////
49 INLINE Mutex::
50 #ifdef DEBUG_THREADS
51 Mutex(const string &name) : MutexDebug(name, false, false)
52 #else
53 Mutex(const string &)
54 #endif // DEBUG_THREADS
55 {
56 }
57 
58 ////////////////////////////////////////////////////////////////////
59 // Function: Mutex::Destructor
60 // Access: Published
61 // Description:
62 ////////////////////////////////////////////////////////////////////
63 INLINE Mutex::
64 ~Mutex() {
65 }
66 
67 ////////////////////////////////////////////////////////////////////
68 // Function: Mutex::Copy Constructor
69 // Access: Private
70 // Description: Do not attempt to copy mutexes.
71 ////////////////////////////////////////////////////////////////////
72 INLINE Mutex::
73 #ifdef DEBUG_THREADS
74 Mutex(const Mutex &copy) : MutexDebug(string(), false, false)
75 #else
76  Mutex(const Mutex &copy)
77 #endif // DEBUG_THREADS
78 {
79  nassertv(false);
80 }
81 
82 ////////////////////////////////////////////////////////////////////
83 // Function: Mutex::Copy Assignment Operator
84 // Access: Private
85 // Description: Do not attempt to copy mutexes.
86 ////////////////////////////////////////////////////////////////////
87 INLINE void Mutex::
88 operator = (const Mutex &copy) {
89  nassertv(false);
90 }
A standard mutex, or mutual exclusion lock.
Definition: pmutex.h:44