File indexing completed on 2025-01-30 09:33:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014 #ifndef BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_MSVC_ARM_HPP_INCLUDED_
0015 #define BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_MSVC_ARM_HPP_INCLUDED_
0016
0017 #include <boost/memory_order.hpp>
0018 #include <boost/atomic/detail/config.hpp>
0019 #include <boost/atomic/detail/ops_msvc_common.hpp>
0020 #include <boost/atomic/detail/header.hpp>
0021
0022 #ifdef BOOST_HAS_PRAGMA_ONCE
0023 #pragma once
0024 #endif
0025
0026 extern "C" void __dmb(unsigned int);
0027 #if defined(BOOST_MSVC)
0028 #pragma intrinsic(__dmb)
0029 #endif
0030
0031 namespace boost {
0032 namespace atomics {
0033 namespace detail {
0034
0035
0036 struct fence_arch_operations_msvc_arm
0037 {
0038 static BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT
0039 {
0040 BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
0041 if (order != memory_order_relaxed)
0042 hardware_full_fence();
0043 BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
0044 }
0045
0046 static BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT
0047 {
0048 if (order != memory_order_relaxed)
0049 BOOST_ATOMIC_DETAIL_COMPILER_BARRIER();
0050 }
0051
0052 static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT
0053 {
0054 __dmb(0xB);
0055 }
0056 };
0057
0058 typedef fence_arch_operations_msvc_arm fence_arch_operations;
0059
0060 }
0061 }
0062 }
0063
0064 #include <boost/atomic/detail/footer.hpp>
0065
0066 #endif