1 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
2 #define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
4 // MS compatible compilers support #pragma once
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
11 // boost/detail/spinlock.hpp
13 // Copyright (c) 2008 Peter Dimov
15 // Distributed under the Boost Software License, Version 1.0.
16 // See accompanying file LICENSE_1_0.txt or copy at
17 // http://www.boost.org/LICENSE_1_0.txt)
28 // #define BOOST_DETAIL_SPINLOCK_INIT <unspecified>
31 #include <boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp>
32 #include <boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp>
33 #include <boost/config.hpp>
35 #if defined( BOOST_SP_USE_STD_ATOMIC )
36 # include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
38 #elif defined( BOOST_SP_USE_PTHREADS )
39 # include <boost/smart_ptr/detail/spinlock_pt.hpp>
41 #elif defined( BOOST_SP_HAS_GCC_INTRINSICS )
42 # include <boost/smart_ptr/detail/spinlock_gcc_atomic.hpp>
44 #elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
45 # include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
47 #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
48 # include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
50 #elif defined( BOOST_SP_HAS_SYNC_INTRINSICS )
51 # include <boost/smart_ptr/detail/spinlock_sync.hpp>
53 #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
54 # include <boost/smart_ptr/detail/spinlock_w32.hpp>
56 #elif defined(BOOST_HAS_PTHREADS)
57 # include <boost/smart_ptr/detail/spinlock_pt.hpp>
59 #elif !defined(BOOST_HAS_THREADS)
60 # include <boost/smart_ptr/detail/spinlock_nt.hpp>
63 # error Unrecognized threading platform
66 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED