Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 09:33:56

0001 /*
0002  * Distributed under the Boost Software License, Version 1.0.
0003  * (See accompanying file LICENSE_1_0.txt or copy at
0004  * http://www.boost.org/LICENSE_1_0.txt)
0005  *
0006  * Copyright (c) 2020 Andrey Semashev
0007  */
0008 /*!
0009  * \file   atomic/detail/fence_operations_emulated.hpp
0010  *
0011  * This header contains implementation of the \c fence_operations struct.
0012  */
0013 
0014 #ifndef BOOST_ATOMIC_DETAIL_FENCE_OPERATIONS_EMULATED_HPP_INCLUDED_
0015 #define BOOST_ATOMIC_DETAIL_FENCE_OPERATIONS_EMULATED_HPP_INCLUDED_
0016 
0017 #include <boost/memory_order.hpp>
0018 #include <boost/atomic/detail/config.hpp>
0019 #include <boost/atomic/detail/lock_pool.hpp>
0020 #include <boost/atomic/detail/header.hpp>
0021 
0022 #ifdef BOOST_HAS_PRAGMA_ONCE
0023 #pragma once
0024 #endif
0025 
0026 namespace boost {
0027 namespace atomics {
0028 namespace detail {
0029 
0030 //! Fence operations based on lock pool
0031 struct fence_operations_emulated
0032 {
0033     static BOOST_FORCEINLINE void thread_fence(memory_order) BOOST_NOEXCEPT
0034     {
0035         atomics::detail::lock_pool::thread_fence();
0036     }
0037 
0038     static BOOST_FORCEINLINE void signal_fence(memory_order) BOOST_NOEXCEPT
0039     {
0040         atomics::detail::lock_pool::signal_fence();
0041     }
0042 };
0043 
0044 } // namespace detail
0045 } // namespace atomics
0046 } // namespace boost
0047 
0048 #include <boost/atomic/detail/footer.hpp>
0049 
0050 #endif // BOOST_ATOMIC_DETAIL_FENCE_OPERATIONS_EMULATED_HPP_INCLUDED_