|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r86416 - in branches/release: . boost boost/detail
From: pdimov_at_[hidden]
Date: 2013-10-24 10:01:54
Author: pdimov
Date: 2013-10-24 10:01:53 EDT (Thu, 24 Oct 2013)
New Revision: 86416
URL: http://svn.boost.org/trac/boost/changeset/86416
Log:
Merged revision(s) 85994 from trunk: Add BOOST_USE_INTRIN_H support; remove #pragma intrinsic, not needed and not supported on Intel. Refs #6646. Refs #7318. Refs #9174.
Properties modified:
branches/release/ (props changed)
branches/release/boost/ (props changed)
branches/release/boost/detail/ (props changed)
branches/release/boost/detail/interlocked.hpp (contents, props changed)
Text files modified:
branches/release/boost/detail/interlocked.hpp | 33 ++++++++++++++++++++++++---------
1 files changed, 24 insertions(+), 9 deletions(-)
Modified: branches/release/boost/detail/interlocked.hpp
==============================================================================
--- branches/release/boost/detail/interlocked.hpp Thu Oct 24 04:35:41 2013 (r86415)
+++ branches/release/boost/detail/interlocked.hpp 2013-10-24 10:01:53 EDT (Thu, 24 Oct 2013) (r86416)
@@ -30,6 +30,30 @@
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER InterlockedCompareExchangePointer
# define BOOST_INTERLOCKED_EXCHANGE_POINTER InterlockedExchangePointer
+#elif defined( BOOST_USE_INTRIN_H )
+
+#include <intrin.h>
+
+# define BOOST_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+# if defined(_M_IA64) || defined(_M_AMD64) || defined(__x86_64__) || defined(__x86_64)
+
+# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
+# define BOOST_INTERLOCKED_EXCHANGE_POINTER _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) \
+ ((void*)BOOST_INTERLOCKED_EXCHANGE((long volatile*)(dest),(long)(exchange)))
+
+# endif
+
#elif defined(_WIN32_WCE)
#if _WIN32_WCE >= 0x600
@@ -92,20 +116,11 @@
#endif
-# pragma intrinsic( _InterlockedIncrement )
-# pragma intrinsic( _InterlockedDecrement )
-# pragma intrinsic( _InterlockedCompareExchange )
-# pragma intrinsic( _InterlockedExchange )
-# pragma intrinsic( _InterlockedExchangeAdd )
-
# if defined(_M_IA64) || defined(_M_AMD64)
extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, void*, void* );
extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* );
-# pragma intrinsic( _InterlockedCompareExchangePointer )
-# pragma intrinsic( _InterlockedExchangePointer )
-
# define BOOST_INTERLOCKED_COMPARE_EXCHANGE_POINTER _InterlockedCompareExchangePointer
# define BOOST_INTERLOCKED_EXCHANGE_POINTER _InterlockedExchangePointer
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