Panda3D

Loading...
Searching...
No Matches
mutexDummyImpl.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 mutexDummyImpl.h
10 * @author drose
11 * @date 2002-08-08
12 */
13
14#ifndef MUTEXDUMMYIMPL_H
15#define MUTEXDUMMYIMPL_H
16
17#include "dtoolbase.h"
18#include "selectThreadImpl.h"
19
20/**
21 * A fake mutex implementation for single-threaded applications that don't
22 * need any synchronization control. This does nothing at all.
23 */
24 class EXPCL_DTOOL_DTOOLBASE MutexDummyImpl {
25 public:
26 constexpr MutexDummyImpl() = default;
27 MutexDummyImpl(const MutexDummyImpl &copy) = delete;
28
29 MutexDummyImpl &operator = (const MutexDummyImpl &copy) = delete;
30
31 public:
32 ALWAYS_INLINE void lock();
33 ALWAYS_INLINE bool try_lock();
34 ALWAYS_INLINE void unlock();
35};
36
37#include "mutexDummyImpl.I"
38
39#endif
dtoolbase.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
mutexDummyImpl.I
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
selectThreadImpl.h
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.