Panda3D
lightReMutex.h
1 // Filename: lightReMutex.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 LIGHTREMUTEX_H
16 #define LIGHTREMUTEX_H
17 
18 #include "pandabase.h"
19 #include "mutexDebug.h"
20 #include "lightReMutexDirect.h"
21 
22 ////////////////////////////////////////////////////////////////////
23 // Class : LightReMutex
24 // Description : A lightweight reentrant mutex. See LightMutex and
25 // ReMutex.
26 //
27 // This class inherits its implementation either from
28 // MutexDebug or LightReMutexDirect, depending on the
29 // definition of DEBUG_THREADS.
30 ////////////////////////////////////////////////////////////////////
31 #ifdef DEBUG_THREADS
32 class EXPCL_PANDA_PIPELINE LightReMutex : public MutexDebug
33 #else
34 class EXPCL_PANDA_PIPELINE LightReMutex : public LightReMutexDirect
35 #endif // DEBUG_THREADS
36 {
37 PUBLISHED:
38  INLINE LightReMutex();
39 public:
40  INLINE LightReMutex(const char *name);
41 PUBLISHED:
42  INLINE LightReMutex(const string &name);
43  INLINE ~LightReMutex();
44 private:
45  INLINE LightReMutex(const LightReMutex &copy);
46  INLINE void operator = (const LightReMutex &copy);
47 };
48 
49 #include "lightReMutex.I"
50 
51 #endif
This class implements a standard lightReMutex by making direct calls to the underlying implementation...
A lightweight reentrant mutex.
Definition: lightReMutex.h:34