File indexing completed on 2025-01-30 09:33:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_ATOMIC_DETAIL_FENCE_OPS_GCC_ATOMIC_HPP_INCLUDED_
0015 #define BOOST_ATOMIC_DETAIL_FENCE_OPS_GCC_ATOMIC_HPP_INCLUDED_
0016
0017 #include <boost/memory_order.hpp>
0018 #include <boost/atomic/detail/config.hpp>
0019 #include <boost/atomic/detail/fence_arch_operations.hpp>
0020 #include <boost/atomic/detail/gcc_atomic_memory_order_utils.hpp>
0021 #include <boost/atomic/detail/header.hpp>
0022
0023 #ifdef BOOST_HAS_PRAGMA_ONCE
0024 #pragma once
0025 #endif
0026
0027 #if defined(__INTEL_COMPILER)
0028
0029
0030
0031
0032
0033 #pragma system_header
0034 #endif
0035
0036 namespace boost {
0037 namespace atomics {
0038 namespace detail {
0039
0040
0041 struct fence_operations_gcc_atomic
0042 {
0043 static BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT
0044 {
0045 #if defined(__x86_64__) || defined(__i386__)
0046 if (order != memory_order_seq_cst)
0047 {
0048 __atomic_thread_fence(atomics::detail::convert_memory_order_to_gcc(order));
0049 }
0050 else
0051 {
0052
0053
0054 fence_arch_operations::thread_fence(order);
0055 }
0056 #else
0057 __atomic_thread_fence(atomics::detail::convert_memory_order_to_gcc(order));
0058 #endif
0059 }
0060
0061 static BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT
0062 {
0063 __atomic_signal_fence(atomics::detail::convert_memory_order_to_gcc(order));
0064 }
0065 };
0066
0067 typedef fence_operations_gcc_atomic fence_operations;
0068
0069 }
0070 }
0071 }
0072
0073 #include <boost/atomic/detail/footer.hpp>
0074
0075 #endif