diff options
Diffstat (limited to 'boost/atomic/detail/ops_msvc_x86.hpp')
-rw-r--r-- | boost/atomic/detail/ops_msvc_x86.hpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/boost/atomic/detail/ops_msvc_x86.hpp b/boost/atomic/detail/ops_msvc_x86.hpp index 04b496efb6..24824214dd 100644 --- a/boost/atomic/detail/ops_msvc_x86.hpp +++ b/boost/atomic/detail/ops_msvc_x86.hpp @@ -72,6 +72,8 @@ namespace detail { struct msvc_x86_operations_base { + static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true; + static BOOST_FORCEINLINE void hardware_full_fence() BOOST_NOEXCEPT { #if defined(BOOST_ATOMIC_DETAIL_X86_HAS_MFENCE) @@ -610,6 +612,8 @@ struct msvc_dcas_x86 typedef typename make_storage_type< 8u, Signed >::type storage_type; typedef typename make_storage_type< 8u, Signed >::aligned aligned_storage_type; + static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true; + // Intel 64 and IA-32 Architectures Software Developer's Manual, Volume 3A, 8.1.1. Guaranteed Atomic Operations: // // The Pentium processor (and newer processors since) guarantees that the following additional memory operations will always be carried out atomically: @@ -768,7 +772,7 @@ struct msvc_dcas_x86 return compare_exchange_strong(storage, expected, desired, success_order, failure_order); } - static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order order) BOOST_NOEXCEPT + static BOOST_FORCEINLINE storage_type exchange(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { BOOST_ATOMIC_DETAIL_COMPILER_BARRIER(); @@ -863,6 +867,8 @@ struct msvc_dcas_x86_64 typedef typename make_storage_type< 16u, Signed >::type storage_type; typedef typename make_storage_type< 16u, Signed >::aligned aligned_storage_type; + static BOOST_CONSTEXPR_OR_CONST bool is_always_lock_free = true; + static BOOST_FORCEINLINE void store(storage_type volatile& storage, storage_type v, memory_order) BOOST_NOEXCEPT { storage_type value = const_cast< storage_type& >(storage); |