Chris@101: /* Chris@101: * Distributed under the Boost Software License, Version 1.0. Chris@101: * (See accompanying file LICENSE_1_0.txt or copy at Chris@101: * http://www.boost.org/LICENSE_1_0.txt) Chris@101: * Chris@101: * Copyright (c) 2011 Helge Bahmann Chris@101: * Copyright (c) 2013-2014 Andrey Semashev Chris@101: */ Chris@101: /*! Chris@101: * \file atomic/detail/lockpool.hpp Chris@101: * Chris@101: * This header contains declaration of the lockpool used to emulate atomic ops. Chris@101: */ Chris@16: Chris@101: #ifndef BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_ Chris@101: #define BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_ Chris@16: Chris@16: #include Chris@16: #include Chris@16: Chris@16: #ifdef BOOST_HAS_PRAGMA_ONCE Chris@16: #pragma once Chris@16: #endif Chris@16: Chris@16: namespace boost { Chris@16: namespace atomics { Chris@16: namespace detail { Chris@16: Chris@101: struct lockpool Chris@16: { Chris@101: class scoped_lock Chris@16: { Chris@101: void* m_lock; Chris@16: Chris@16: public: Chris@101: explicit BOOST_ATOMIC_DECL scoped_lock(const volatile void* addr) BOOST_NOEXCEPT; Chris@101: BOOST_ATOMIC_DECL ~scoped_lock() BOOST_NOEXCEPT; Chris@16: Chris@16: BOOST_DELETED_FUNCTION(scoped_lock(scoped_lock const&)) Chris@16: BOOST_DELETED_FUNCTION(scoped_lock& operator=(scoped_lock const&)) Chris@16: }; Chris@16: Chris@101: static BOOST_ATOMIC_DECL void thread_fence() BOOST_NOEXCEPT; Chris@101: static BOOST_ATOMIC_DECL void signal_fence() BOOST_NOEXCEPT; Chris@16: }; Chris@16: Chris@101: } // namespace detail Chris@101: } // namespace atomics Chris@101: } // namespace boost Chris@16: Chris@101: #endif // BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_