|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86320 - trunk/boost/atomic/detail
From: andrey.semashev_at_[hidden]
Date: 2013-10-15 07:08:22
Author: andysem
Date: 2013-10-15 07:08:22 EDT (Tue, 15 Oct 2013)
New Revision: 86320
URL: http://svn.boost.org/trac/boost/changeset/86320
Log:
Reverted commit 86144, which was misapplied and not required. The support for 64-bit atomic ops on 32-bit x86 was already present before.
Text files modified:
trunk/boost/atomic/detail/interlocked.hpp | 4 ----
trunk/boost/atomic/detail/windows.hpp | 27 ---------------------------
2 files changed, 0 insertions(+), 31 deletions(-)
Modified: trunk/boost/atomic/detail/interlocked.hpp
==============================================================================
--- trunk/boost/atomic/detail/interlocked.hpp Tue Oct 15 06:17:17 2013 (r86319)
+++ trunk/boost/atomic/detail/interlocked.hpp 2013-10-15 07:08:22 EDT (Tue, 15 Oct 2013) (r86320)
@@ -107,14 +107,10 @@
#else // defined(_M_AMD64) || defined(_M_IA64)
-#pragma intrinsic(_InterlockedCompareExchange64)
-
#define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest, exchange, compare) ((void*)_InterlockedCompareExchange((long*)(dest), (long)(exchange), (long)(compare)))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_POINTER(dest, newval) ((void*)_InterlockedExchange((long*)(dest), (long)(newval)))
#define BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD_POINTER(dest, byte_offset) ((void*)BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD((long*)(dest), byte_offset))
-#define BOOST_ATOMIC_INTERLOCKED_COMPARE_EXCHANGE64(dest, exchange, compare) _InterlockedCompareExchange64((__int64*)(dest), (__int64)(exchange), (__int64)(compare))
-
#endif // defined(_M_AMD64) || defined(_M_IA64)
#else // defined(_MSC_VER) && _MSC_VER >= 1400
Modified: trunk/boost/atomic/detail/windows.hpp
==============================================================================
--- trunk/boost/atomic/detail/windows.hpp Tue Oct 15 06:17:17 2013 (r86319)
+++ trunk/boost/atomic/detail/windows.hpp 2013-10-15 07:08:22 EDT (Tue, 15 Oct 2013) (r86320)
@@ -1310,19 +1310,10 @@
value_type
fetch_add(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
{
-#if defined(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64)
platform_fence_before(order);
v = static_cast< value_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE_ADD64(&v_, v));
platform_fence_after(order);
return v;
-#else
- value_type tmp = load(memory_order_relaxed);
- for (; !compare_exchange_weak(tmp, tmp + v, order, memory_order_relaxed);)
- {
- BOOST_ATOMIC_X86_PAUSE();
- }
- return tmp;
-#endif
}
value_type
@@ -1335,19 +1326,10 @@
value_type
exchange(value_type v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
{
-#if defined(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64)
platform_fence_before(order);
v = static_cast< value_type >(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64(&v_, v));
platform_fence_after(order);
return v;
-#else
- value_type tmp = load(memory_order_relaxed);
- for (; !compare_exchange_weak(tmp, v, order, memory_order_relaxed);)
- {
- BOOST_ATOMIC_X86_PAUSE();
- }
- return tmp;
-#endif
}
bool
@@ -1492,7 +1474,6 @@
value_type
exchange(value_type const& v, memory_order order = memory_order_seq_cst) volatile BOOST_NOEXCEPT
{
-#if defined(BOOST_ATOMIC_INTERLOCKED_EXCHANGE64)
storage_type tmp = 0;
memcpy(&tmp, &v, sizeof(value_type));
platform_fence_before(order);
@@ -1501,14 +1482,6 @@
value_type res;
memcpy(&res, &tmp, sizeof(value_type));
return res;
-#else
- value_type cur = load(memory_order_relaxed);
- for (; !compare_exchange_weak(cur, v, order, memory_order_relaxed);)
- {
- BOOST_ATOMIC_X86_PAUSE();
- }
- return cur;
-#endif
}
bool
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk