Chris@16
|
1 #ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
|
Chris@16
|
2 #define BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
|
Chris@16
|
3
|
Chris@16
|
4 // MS compatible compilers support #pragma once
|
Chris@16
|
5
|
Chris@16
|
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
|
Chris@16
|
7 # pragma once
|
Chris@16
|
8 #endif
|
Chris@16
|
9
|
Chris@16
|
10 //
|
Chris@16
|
11 // boost/detail/lightweight_mutex.hpp - lightweight mutex
|
Chris@16
|
12 //
|
Chris@16
|
13 // Copyright (c) 2002, 2003 Peter Dimov and Multi Media Ltd.
|
Chris@16
|
14 //
|
Chris@16
|
15 // Distributed under the Boost Software License, Version 1.0. (See
|
Chris@16
|
16 // accompanying file LICENSE_1_0.txt or copy at
|
Chris@16
|
17 // http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
18 //
|
Chris@16
|
19 // typedef <unspecified> boost::detail::lightweight_mutex;
|
Chris@16
|
20 //
|
Chris@16
|
21 // boost::detail::lightweight_mutex is a header-only implementation of
|
Chris@16
|
22 // a subset of the Mutex concept requirements:
|
Chris@16
|
23 //
|
Chris@16
|
24 // http://www.boost.org/doc/html/threads/concepts.html#threads.concepts.Mutex
|
Chris@16
|
25 //
|
Chris@16
|
26 // It maps to a CRITICAL_SECTION on Windows or a pthread_mutex on POSIX.
|
Chris@16
|
27 //
|
Chris@16
|
28
|
Chris@16
|
29 #include <boost/config.hpp>
|
Chris@16
|
30
|
Chris@16
|
31 #if !defined(BOOST_HAS_THREADS)
|
Chris@16
|
32 # include <boost/smart_ptr/detail/lwm_nop.hpp>
|
Chris@16
|
33 #elif defined(BOOST_HAS_PTHREADS)
|
Chris@16
|
34 # include <boost/smart_ptr/detail/lwm_pthreads.hpp>
|
Chris@16
|
35 #elif defined(BOOST_HAS_WINTHREADS) || defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
Chris@16
|
36 # include <boost/smart_ptr/detail/lwm_win32_cs.hpp>
|
Chris@16
|
37 #else
|
Chris@16
|
38 // Use #define BOOST_DISABLE_THREADS to avoid the error
|
Chris@16
|
39 # error Unrecognized threading platform
|
Chris@16
|
40 #endif
|
Chris@16
|
41
|
Chris@16
|
42 #endif // #ifndef BOOST_SMART_PTR_DETAIL_LIGHTWEIGHT_MUTEX_HPP_INCLUDED
|