From d3af1bace981f23931dc930e0b52a2d9ffdc0ceb Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Fri, 9 May 2014 19:04:41 +0400 Subject: [PATCH] Fixed compilation. --- include/boost/atomic/detail/ops_linux_arm.hpp | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/include/boost/atomic/detail/ops_linux_arm.hpp b/include/boost/atomic/detail/ops_linux_arm.hpp index 8533990..0e83dc6 100644 --- a/include/boost/atomic/detail/ops_linux_arm.hpp +++ b/include/boost/atomic/detail/ops_linux_arm.hpp @@ -55,8 +55,18 @@ namespace detail { // emulated CAS is only good enough to provide compare_exchange_weak // semantics. +struct linux_arm_cas_base +{ + static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT + { + typedef void (*kernel_dmb_t)(void); + ((kernel_dmb_t)0xffff0fa0)(); + } +}; + template< bool Signed > -struct linux_arm_cas +struct linux_arm_cas : + public linux_arm_cas_base { typedef typename make_storage_type< 4u, Signed >::type storage_type; @@ -111,12 +121,6 @@ struct linux_arm_cas return true; } - static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT - { - typedef void (*kernel_dmb_t)(void); - ((kernel_dmb_t)0xffff0fa0)(); - } - private: static BOOST_FORCEINLINE void fence_before_store(memory_order order) BOOST_NOEXCEPT { @@ -181,7 +185,7 @@ BOOST_FORCEINLINE void thread_fence(memory_order order) BOOST_NOEXCEPT case memory_order_acquire: case memory_order_acq_rel: case memory_order_seq_cst: - linux_arm_cas::hardware_full_fence(); + linux_arm_cas_base::hardware_full_fence(); break; } }