Panda3D
Loading...
Searching...
No Matches
lightMutexHolder.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 lightMutexHolder.h
10 * @author drose
11 * @date 2008-10-08
12 */
13
14#ifndef LIGHTMUTEXHOLDER_H
15#define LIGHTMUTEXHOLDER_H
16
17#include "pandabase.h"
18#include "lightMutex.h"
19
20class Thread;
21
22/**
23 * Similar to MutexHolder, but for a light mutex.
24 */
25class EXPCL_PANDA_PIPELINE LightMutexHolder {
26public:
27 INLINE LightMutexHolder(const LightMutex &mutex);
28 INLINE LightMutexHolder(LightMutex *&mutex);
29 LightMutexHolder(const LightMutexHolder &copy) = delete;
30 INLINE ~LightMutexHolder();
31
32 LightMutexHolder &operator = (const LightMutexHolder &copy) = delete;
33
34private:
35#if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
36 const LightMutex *_mutex;
37#endif
38};
39
40#include "lightMutexHolder.I"
41
42#endif
Similar to MutexHolder, but for a light mutex.
This is a standard, non-reentrant mutex, similar to the Mutex class.
Definition lightMutex.h:41
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.