Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-14 08:48:14

0001 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
0002 #define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
0003 
0004 // MS compatible compilers support #pragma once
0005 
0006 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
0007 # pragma once
0008 #endif
0009 
0010 //
0011 //  boost/detail/spinlock.hpp
0012 //
0013 //  Copyright (c) 2008 Peter Dimov
0014 //
0015 //  Distributed under the Boost Software License, Version 1.0.
0016 //  See accompanying file LICENSE_1_0.txt or copy at
0017 //  http://www.boost.org/LICENSE_1_0.txt)
0018 //
0019 //  struct spinlock
0020 //  {
0021 //      void lock();
0022 //      bool try_lock();
0023 //      void unlock();
0024 //
0025 //      class scoped_lock;
0026 //  };
0027 //
0028 //  #define BOOST_DETAIL_SPINLOCK_INIT <unspecified>
0029 //
0030 
0031 #include <boost/smart_ptr/detail/sp_has_gcc_intrinsics.hpp>
0032 #include <boost/smart_ptr/detail/sp_has_sync_intrinsics.hpp>
0033 #include <boost/smart_ptr/detail/deprecated_macros.hpp>
0034 #include <boost/config.hpp>
0035 
0036 #if defined( BOOST_SP_USE_STD_ATOMIC )
0037 #  include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
0038 
0039 #elif defined( BOOST_SP_USE_PTHREADS )
0040 #  include <boost/smart_ptr/detail/spinlock_pt.hpp>
0041 
0042 #elif defined( BOOST_SP_HAS_GCC_INTRINSICS )
0043 #  include <boost/smart_ptr/detail/spinlock_gcc_atomic.hpp>
0044 
0045 #elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
0046 #  include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
0047 
0048 #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
0049 #  include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
0050 
0051 #elif defined( BOOST_SP_HAS_SYNC_INTRINSICS )
0052 #  include <boost/smart_ptr/detail/spinlock_sync.hpp>
0053 
0054 #elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
0055 #  include <boost/smart_ptr/detail/spinlock_w32.hpp>
0056 
0057 #elif defined(BOOST_HAS_PTHREADS)
0058 #  include <boost/smart_ptr/detail/spinlock_pt.hpp>
0059 
0060 #elif !defined(BOOST_HAS_THREADS)
0061 #  include <boost/smart_ptr/detail/spinlock_nt.hpp>
0062 
0063 #else
0064 #  error Unrecognized threading platform
0065 #endif
0066 
0067 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED