Panda3D
 All Classes Functions Variables Enumerations
lightMutexHolder.h
1 // Filename: lightMutexHolder.h
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 #ifndef LIGHTMUTEXHOLDER_H
16 #define LIGHTMUTEXHOLDER_H
17 
18 #include "pandabase.h"
19 #include "lightMutex.h"
20 
21 class Thread;
22 
23 ////////////////////////////////////////////////////////////////////
24 // Class : LightMutexHolder
25 // Description : Similar to MutexHolder, but for a light mutex.
26 ////////////////////////////////////////////////////////////////////
27 class EXPCL_PANDA_PIPELINE LightMutexHolder {
28 public:
29  INLINE LightMutexHolder(const LightMutex &mutex);
30  INLINE LightMutexHolder(LightMutex *&mutex);
31  INLINE ~LightMutexHolder();
32 private:
33  INLINE LightMutexHolder(const LightMutexHolder &copy);
34  INLINE void operator = (const LightMutexHolder &copy);
35 
36 private:
37 #if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
38  const LightMutex *_mutex;
39 #endif
40 };
41 
42 #include "lightMutexHolder.I"
43 
44 #endif
Similar to MutexHolder, but for a light mutex.
A thread; that is, a lightweight process.
Definition: thread.h:51
This is a standard, non-reentrant mutex, similar to the Mutex class.
Definition: lightMutex.h:45