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
20 class Thread;
21
22/**
23 * Similar to MutexHolder, but for a light mutex.
24 */
25 class EXPCL_PANDA_PIPELINE LightMutexHolder {
26 public:
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
34 private:
35#if defined(HAVE_THREADS) || defined(DEBUG_THREADS)
36 const LightMutex *_mutex;
37#endif
38};
39
40#include "lightMutexHolder.I"
41
42#endif
LightMutex
This is a standard, non-reentrant mutex, similar to the Mutex class.
Definition lightMutex.h:41
Thread
A thread; that is, a lightweight process.
Definition thread.h:46
lightMutexHolder.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
lightMutex.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
pandabase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.