1 // Copyright (C) 2000 Stephen Cleary
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)
7 // See http://www.boost.org for updates, documentation, and revision history.
9 #ifndef BOOST_POOL_MUTEX_HPP
10 #define BOOST_POOL_MUTEX_HPP
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>
21 namespace boost{ namespace details{ namespace pool{
26 null_mutex(const null_mutex &);
27 void operator=(const null_mutex &);
32 static void lock() { }
33 static void unlock() { }
36 #if !defined(BOOST_HAS_THREADS) || defined(BOOST_NO_MT) || defined(BOOST_POOL_NO_MT)
37 typedef null_mutex default_mutex;
39 #if defined (BOOST_NO_CXX11_HDR_MUTEX)
40 typedef boost::mutex default_mutex;
42 typedef std::mutex default_mutex;
47 } // namespace details