Panda3D
reMutex.h
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 reMutex.h
10  * @author drose
11  * @date 2006-01-15
12  */
13 
14 #ifndef REMUTEX_H
15 #define REMUTEX_H
16 
17 #include "pandabase.h"
18 #include "mutexDebug.h"
19 #include "reMutexDirect.h"
20 
21 /**
22  * A reentrant mutex. This kind of mutex can be locked more than once by the
23  * thread that already holds it, without deadlock. The thread must eventually
24  * release the mutex the same number of times it locked it.
25  *
26  * This class inherits its implementation either from MutexDebug or
27  * ReMutexDirect, depending on the definition of DEBUG_THREADS.
28  */
29 #ifdef DEBUG_THREADS
30 class EXPCL_PANDA_PIPELINE ReMutex : public MutexDebug
31 #else
32 class EXPCL_PANDA_PIPELINE ReMutex : public ReMutexDirect
33 #endif // DEBUG_THREADS
34 {
35 PUBLISHED:
36  INLINE ReMutex();
37 public:
38  INLINE explicit ReMutex(const char *name);
39 PUBLISHED:
40  INLINE explicit ReMutex(const std::string &name);
41  ReMutex(const ReMutex &copy) = delete;
42  ~ReMutex() = default;
43 
44  void operator = (const ReMutex &copy) = delete;
45 };
46 
47 #include "reMutex.I"
48 
49 #endif
This class implements a standard reMutex by making direct calls to the underlying implementation laye...
Definition: reMutexDirect.h:29
A reentrant mutex.
Definition: reMutex.h:34
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.