]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/pool/include/boost/pool/detail/mutex.hpp
bump version to 12.2.2-pve1
[ceph.git] / ceph / src / boost / libs / pool / include / boost / pool / detail / mutex.hpp
1 // Copyright (C) 2000 Stephen Cleary
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See
4 // accompanying file LICENSE_1_0.txt or copy at
5 // http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // See http://www.boost.org for updates, documentation, and revision history.
8
9 #ifndef BOOST_POOL_MUTEX_HPP
10 #define BOOST_POOL_MUTEX_HPP
11
12 #include <boost/config.hpp> // for workarounds
13 #if defined (BOOST_HAS_THREADS) && !defined(BOOST_POOL_NO_MT)
14 #if defined (BOOST_NO_CXX11_HDR_MUTEX)
15 #include <boost/thread/mutex.hpp>
16 #else
17 #include <mutex>
18 #endif
19 #endif
20
21 namespace boost{ namespace details{ namespace pool{
22
23 class null_mutex
24 {
25 private:
26 null_mutex(const null_mutex &);
27 void operator=(const null_mutex &);
28
29 public:
30 null_mutex() { }
31
32 static void lock() { }
33 static void unlock() { }
34 };
35
36 #if !defined(BOOST_HAS_THREADS) || defined(BOOST_NO_MT) || defined(BOOST_POOL_NO_MT)
37 typedef null_mutex default_mutex;
38 #else
39 #if defined (BOOST_NO_CXX11_HDR_MUTEX)
40 typedef boost::mutex default_mutex;
41 #else
42 typedef std::mutex default_mutex;
43 #endif
44 #endif
45
46 } // namespace pool
47 } // namespace details
48 } // namespace boost
49
50 #endif