Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
mutex_auto_lock.h
Go to the documentation of this file.
1/*
2This file is a part of the JThread package, which contains some object-
3oriented thread wrappers for different thread implementations.
4
5Copyright (c) 2000-2006 Jori Liesenborgs (jori.liesenborgs@gmail.com)
6
7Permission is hereby granted, free of charge, to any person obtaining a
8copy of this software and associated documentation files (the "Software"),
9to deal in the Software without restriction, including without limitation
10the rights to use, copy, modify, merge, publish, distribute, sublicense,
11and/or sell copies of the Software, and to permit persons to whom the
12Software is furnished to do so, subject to the following conditions:
13
14The above copyright notice and this permission notice shall be included in
15all copies or substantial portions of the Software.
16
17THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
22FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23DEALINGS IN THE SOFTWARE.
24*/
25
26#pragma once
27
28#include <mutex>
29
31using MutexAutoLock = std::lock_guard<std::mutex>;
33using RecursiveMutexAutoLock = std::lock_guard<std::recursive_mutex>;
std::lock_guard< std::mutex > MutexAutoLock
Definition mutex_auto_lock.h:31
std::lock_guard< std::recursive_mutex > RecursiveMutexAutoLock
Definition mutex_auto_lock.h:33