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_GCC_AARCH32_HPP_INCLUDED_
0015 #define BOOST_ATOMIC_DETAIL_FENCE_ARCH_OPS_GCC_AARCH32_HPP_INCLUDED_
0016
0017 #include <boost/cstdint.hpp>
0018 #include <boost/memory_order.hpp>
0019 #include <boost/atomic/detail/config.hpp>
0020 #include <boost/atomic/detail/capabilities.hpp>
0021 #include <boost/atomic/detail/header.hpp>
0022
0023 #ifdef BOOST_HAS_PRAGMA_ONCE
0024 #pragma once
0025 #endif
0026
0027 namespace boost {
0028 namespace atomics {
0029 namespace detail {
0030
0031
0032 struct fence_arch_operations_gcc_aarch32
0033 {
0034 static BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT
0035 {
0036 if (order != memory_order_relaxed)
0037 {
0038 if (order == memory_order_consume || order == memory_order_acquire)
0039 __asm__ __volatile__ ("dmb ishld\n\t" ::: "memory");
0040 else
0041 __asm__ __volatile__ ("dmb ish\n\t" ::: "memory");
0042 }
0043 }
0044
0045 static BOOST_FORCEINLINE void signal_fence(memory_order order) BOOST_NOEXCEPT
0046 {
0047 if (order != memory_order_relaxed)
0048 __asm__ __volatile__ ("" ::: "memory");
0049 }
0050 };
0051
0052 typedef fence_arch_operations_gcc_aarch32 fence_arch_operations;
0053
0054 }
0055 }
0056 }
0057
0058 #include <boost/atomic/detail/footer.hpp>
0059
0060 #endif