summaryrefslogtreecommitdiff
path: root/boost/atomic/detail/ops_linux_arm.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/atomic/detail/ops_linux_arm.hpp')
-rw-r--r--boost/atomic/detail/ops_linux_arm.hpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/boost/atomic/detail/ops_linux_arm.hpp b/boost/atomic/detail/ops_linux_arm.hpp
index 840c125a7b..16af1732cf 100644
--- a/boost/atomic/detail/ops_linux_arm.hpp
+++ b/boost/atomic/detail/ops_linux_arm.hpp
@@ -58,11 +58,12 @@ namespace detail {
struct linux_arm_cas_base
{
+ static BOOST_CONSTEXPR_OR_CONST bool full_cas_based = true;
static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true;
static BOOST_FORCEINLINE void fence_before_store(memory_order order) BOOST_NOEXCEPT
{
- if ((order & memory_order_release) != 0)
+ if ((static_cast< unsigned int >(order) & static_cast< unsigned int >(memory_order_release)) != 0u)
hardware_full_fence();
}
@@ -74,7 +75,7 @@ struct linux_arm_cas_base
static BOOST_FORCEINLINE void fence_after_load(memory_order order) BOOST_NOEXCEPT
{
- if ((order & (memory_order_consume | memory_order_acquire)) != 0)
+ if ((static_cast< unsigned int >(order) & (static_cast< unsigned int >(memory_order_consume) | static_cast< unsigned int >(memory_order_acquire))) != 0u)
hardware_full_fence();
}
@@ -89,8 +90,8 @@ template< bool Signed >
struct linux_arm_cas :
public linux_arm_cas_base
{
- typedef typename make_storage_type< 4u, Signed >::type storage_type;
- typedef typename make_storage_type< 4u, Signed >::aligned aligned_storage_type;
+ typedef typename make_storage_type< 4u >::type storage_type;
+ typedef typename make_storage_type< 4u >::aligned aligned_storage_type;
static BOOST_CONSTEXPR_OR_CONST std::size_t storage_size = 4u;
static BOOST_CONSTEXPR_OR_CONST bool is_signed = Signed;