1 #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED
2 #define BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED
4 // MS compatible compilers support #pragma once
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
11 // Copyright (c) 2008 Peter Dimov
13 // Distributed under the Boost Software License, Version 1.0.
14 // See accompanying file LICENSE_1_0.txt or copy at
15 // http://www.boost.org/LICENSE_1_0.txt)
18 #include <boost/assert.hpp>
20 #if defined(BOOST_SP_REPORT_IMPLEMENTATION)
22 #include <boost/config/pragma_message.hpp>
23 BOOST_PRAGMA_MESSAGE("Using single-threaded spinlock emulation")
41 inline bool try_lock()
56 BOOST_ASSERT( !locked_ );
62 BOOST_ASSERT( locked_ );
74 scoped_lock( scoped_lock const & );
75 scoped_lock & operator=( scoped_lock const & );
79 explicit scoped_lock( spinlock & sp ): sp_( sp )
94 #define BOOST_DETAIL_SPINLOCK_INIT { false }
96 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_NT_HPP_INCLUDED