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
0017
0018 #ifndef BOOST_ATOMIC_DETAIL_FENCE_OPS_LINUX_ARM_HPP_INCLUDED_
0019 #define BOOST_ATOMIC_DETAIL_FENCE_OPS_LINUX_ARM_HPP_INCLUDED_
0020
0021 #include <boost/memory_order.hpp>
0022 #include <boost/atomic/detail/config.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
0034 struct fence_operations_linux_arm
0035 {
0036 static BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT
0037 {
0038 if (order != memory_order_relaxed)
0039 hardware_full_fence();
0040 }
0041
0042 static BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT
0043 {
0044 if (order != memory_order_relaxed)
0045 __asm__ __volatile__ ("" ::: "memory");
0046 }
0047
0048 static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT
0049 {
0050
0051 typedef void (*kernel_dmb_t)(void);
0052 ((kernel_dmb_t)0xffff0fa0)();
0053 }
0054 };
0055
0056 typedef fence_operations_linux_arm fence_operations;
0057
0058 }
0059 }
0060 }
0061
0062 #include <boost/atomic/detail/footer.hpp>
0063
0064 #endif