Panda3D
Loading...
Searching...
No Matches
reMutexHolder.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 reMutexHolder.h
10 * @author drose
11 * @date 2006-01-15
12 */
13
14#ifndef REMUTEXHOLDER_H
15#define REMUTEXHOLDER_H
16
17#include "pandabase.h"
18#include "reMutex.h"
19
20class Thread;
21
22/**
23 * Similar to MutexHolder, but for a reentrant mutex.
24 */
25class EXPCL_PANDA_PIPELINE ReMutexHolder {
26public:
27 INLINE ReMutexHolder(const ReMutex &mutex);
28 INLINE ReMutexHolder(const ReMutex &mutex, Thread *current_thread);
29 INLINE ReMutexHolder(ReMutex *&mutex);
30 ReMutexHolder(const ReMutexHolder &copy) = delete;
31 INLINE ~ReMutexHolder();
32
33 ReMutexHolder &operator = (const ReMutexHolder &copy) = delete;
34
35private:
36#if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
37 const ReMutex *_mutex;
38#endif
39};
40
41#include "reMutexHolder.I"
42
43#endif
Similar to MutexHolder, but for a reentrant mutex.
A reentrant mutex.
Definition reMutex.h:34
A thread; that is, a lightweight process.
Definition thread.h:46
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.