aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/Lock.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/3rdParty/efsw/Lock.hpp')
-rwxr-xr-xsrc/3rdParty/efsw/Lock.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/3rdParty/efsw/Lock.hpp b/src/3rdParty/efsw/Lock.hpp
new file mode 100755
index 0000000..e8c522a
--- /dev/null
+++ b/src/3rdParty/efsw/Lock.hpp
@@ -0,0 +1,21 @@
1#ifndef EFSW_LOCK_HPP
2#define EFSW_LOCK_HPP
3
4#include <efsw/Mutex.hpp>
5
6namespace efsw {
7
8/** Simple mutex class */
9class Lock {
10 public:
11 explicit Lock( Mutex& mutex ) : mMutex( mutex ) { mMutex.lock(); }
12
13 ~Lock() { mMutex.unlock(); }
14
15 private:
16 Mutex& mMutex;
17};
18
19} // namespace efsw
20
21#endif