1 #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
\r
2 #define BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
\r
4 // MS compatible compilers support #pragma once
\r
6 #if defined(_MSC_VER) && (_MSC_VER >= 1020)
\r
11 // boost/detail/atomic_count_win32.hpp
\r
13 // Copyright (c) 2001-2005 Peter Dimov
\r
15 // Distributed under the Boost Software License, Version 1.0. (See
\r
16 // accompanying file LICENSE_1_0.txt or copy at
\r
17 // http://www.boost.org/LICENSE_1_0.txt)
\r
20 #include <boost/detail/interlocked.hpp>
\r
32 explicit atomic_count( long v ): value_( v )
\r
38 return BOOST_INTERLOCKED_INCREMENT( &value_ );
\r
43 return BOOST_INTERLOCKED_DECREMENT( &value_ );
\r
46 operator long() const
\r
48 return static_cast<long const volatile &>( value_ );
\r
53 atomic_count( atomic_count const & );
\r
54 atomic_count & operator=( atomic_count const & );
\r
59 } // namespace detail
\r
61 } // namespace boost
\r
63 #endif // #ifndef BOOST_SMART_PTR_DETAIL_ATOMIC_COUNT_WIN32_HPP_INCLUDED
\r