comparison DEPENDENCIES/generic/include/boost/pool/detail/mutex.hpp @ 16:2665513ce2d3

Add boost headers
author Chris Cannam
date Tue, 05 Aug 2014 11:11:38 +0100
parents
children
comparison
equal deleted inserted replaced
15:663ca0da4350 16:2665513ce2d3
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 #ifdef BOOST_HAS_THREADS
14 #include <boost/thread/mutex.hpp>
15 #endif
16
17 namespace boost{ namespace details{ namespace pool{
18
19 class null_mutex
20 {
21 private:
22 null_mutex(const null_mutex &);
23 void operator=(const null_mutex &);
24
25 public:
26 null_mutex() { }
27
28 static void lock() { }
29 static void unlock() { }
30 };
31
32 #if !defined(BOOST_HAS_THREADS) || defined(BOOST_NO_MT) || defined(BOOST_POOL_NO_MT)
33 typedef null_mutex default_mutex;
34 #else
35 typedef boost::mutex default_mutex;
36 #endif
37
38 } // namespace pool
39 } // namespace details
40 } // namespace boost
41
42 #endif