Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62509 - trunk/boost/detail
From: anthony_at_[hidden]
Date: 2010-06-07 11:44:33


Author: anthonyw
Date: 2010-06-07 11:44:32 EDT (Mon, 07 Jun 2010)
New Revision: 62509
URL: http://svn.boost.org/trac/boost/changeset/62509

Log:
Applied patch from issue #3377

Text files modified:
   trunk/boost/detail/interlocked.hpp | 14 ++++++++++++--
   1 files changed, 12 insertions(+), 2 deletions(-)

Modified: trunk/boost/detail/interlocked.hpp
==============================================================================
--- trunk/boost/detail/interlocked.hpp (original)
+++ trunk/boost/detail/interlocked.hpp 2010-06-07 11:44:32 EDT (Mon, 07 Jun 2010)
@@ -118,6 +118,11 @@
 extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long );
 extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long );
 
+# if defined(_M_IA64) || defined(_M_AMD64)
+extern "C" __declspec(dllimport) void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
+extern "C" __declspec(dllimport) void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
+# endif
+
 } // namespace detail
 
 } // namespace boost
@@ -128,10 +133,15 @@
 # define BOOST_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
 # define BOOST_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
 
-# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
+# if defined(_M_IA64) || defined(_M_AMD64)
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER ::boost::detail::InterlockedCompareExchangePointer
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER ::boost::detail::InterlockedExchangePointer
+# else
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER(dest,exchange,compare) \
     ((void*)BOOST_INTERLOCKED_COMPARE_EXCHANGE((long volatile*)(dest),(long)(exchange),(long)(compare)))
-# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER(dest,exchange) \
     ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
+# endif
 
 #else
 


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