1 #ifndef BOOST_DETAIL_SPINLOCK_NT_HPP_INCLUDED
2 #define BOOST_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>
34 inline bool try_lock()
49 BOOST_ASSERT( !locked_ );
55 BOOST_ASSERT( locked_ );
67 scoped_lock( scoped_lock const & );
68 scoped_lock & operator=( scoped_lock const & );
72 explicit scoped_lock( spinlock & sp ): sp_( sp )
87 #define BOOST_DETAIL_SPINLOCK_INIT { false }
89 #endif // #ifndef BOOST_DETAIL_SPINLOCK_NT_HPP_INCLUDED