2
0
mirror of https://github.com/boostorg/atomic.git synced 2026-02-13 11:42:11 +00:00

Fixed compilation.

This commit is contained in:
Andrey Semashev
2014-05-09 19:04:41 +04:00
parent 4cb51c6b76
commit d3af1bace9

View File

@@ -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;
}
}