File indexing completed on 2025-01-30 09:33:57
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016 #ifndef BOOST_ATOMIC_DETAIL_OPS_GCC_ARM_COMMON_HPP_INCLUDED_
0017 #define BOOST_ATOMIC_DETAIL_OPS_GCC_ARM_COMMON_HPP_INCLUDED_
0018
0019 #include <boost/cstdint.hpp>
0020 #include <boost/memory_order.hpp>
0021 #include <boost/atomic/detail/config.hpp>
0022 #include <boost/atomic/detail/fence_arch_operations.hpp>
0023 #include <boost/atomic/detail/header.hpp>
0024
0025 #ifdef BOOST_HAS_PRAGMA_ONCE
0026 #pragma once
0027 #endif
0028
0029 namespace boost {
0030 namespace atomics {
0031 namespace detail {
0032
0033 struct core_arch_operations_gcc_arm_base
0034 {
0035 static BOOST_CONSTEXPR_OR_CONST bool full_cas_based = false;
0036 static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true;
0037
0038 static BOOST_FORCEINLINE void fence_before(memory_order order) BOOST_NOEXCEPT
0039 {
0040 if ((static_cast< unsigned int >(order) & static_cast< unsigned int >(memory_order_release)) != 0u)
0041 fence_arch_operations::hardware_full_fence();
0042 }
0043
0044 static BOOST_FORCEINLINE void fence_after(memory_order order) BOOST_NOEXCEPT
0045 {
0046 if ((static_cast< unsigned int >(order) & (static_cast< unsigned int >(memory_order_consume) | static_cast< unsigned int >(memory_order_acquire))) != 0u)
0047 fence_arch_operations::hardware_full_fence();
0048 }
0049
0050 static BOOST_FORCEINLINE void fence_after_store(memory_order order) BOOST_NOEXCEPT
0051 {
0052 if (order == memory_order_seq_cst)
0053 fence_arch_operations::hardware_full_fence();
0054 }
0055 };
0056
0057 }
0058 }
0059 }
0060
0061 #include <boost/atomic/detail/footer.hpp>
0062
0063 #endif