Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75396 - trunk/boost/detail
From: pdimov_at_[hidden]
Date: 2011-11-07 18:08:53


Author: pdimov
Date: 2011-11-07 18:08:53 EST (Mon, 07 Nov 2011)
New Revision: 75396
URL: http://svn.boost.org/trac/boost/changeset/75396

Log:
Use <intrin.h> for VS2010+. Refs #4678.
Text files modified:
   trunk/boost/detail/interlocked.hpp | 20 ++++++++++++--------
   1 files changed, 12 insertions(+), 8 deletions(-)

Modified: trunk/boost/detail/interlocked.hpp
==============================================================================
--- trunk/boost/detail/interlocked.hpp (original)
+++ trunk/boost/detail/interlocked.hpp 2011-11-07 18:08:53 EST (Mon, 07 Nov 2011)
@@ -54,7 +54,11 @@
 
 #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
 
-#if defined( __CLRCALL_PURE_OR_CDECL )
+#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
+
+#include <intrin.h>
+
+#elif defined( __CLRCALL_PURE_OR_CDECL )
 
 extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedIncrement( long volatile * );
 extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedDecrement( long volatile * );
@@ -119,15 +123,15 @@
 namespace detail
 {
 
-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * );
-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * );
-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long );
-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long );
-extern "C"BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedIncrement( long volatile * );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedDecrement( long volatile * );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedCompareExchange( long volatile *, long, long );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchange( long volatile *, long );
+extern "C" BOOST_INTERLOCKED_IMPORT long __stdcall InterlockedExchangeAdd( long volatile *, long );
 
 # if defined(_M_IA64) || defined(_M_AMD64)
-extern "C"BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
-extern "C"BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
+extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedCompareExchangePointer( void* volatile *, void*, void* );
+extern "C" BOOST_INTERLOCKED_IMPORT void* __stdcall InterlockedExchangePointer( void* volatile *, void* );
 # endif
 
 } // namespace detail


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