diff options
| author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) | 
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) | 
| commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
| tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/detail/interlocked.hpp | |
| parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
| download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 | |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/detail/interlocked.hpp')
| -rw-r--r-- | 3rdParty/Boost/src/boost/detail/interlocked.hpp | 72 | 
1 files changed, 51 insertions, 21 deletions
| diff --git a/3rdParty/Boost/src/boost/detail/interlocked.hpp b/3rdParty/Boost/src/boost/detail/interlocked.hpp index 75e5a30..1152f71 100644 --- a/3rdParty/Boost/src/boost/detail/interlocked.hpp +++ b/3rdParty/Boost/src/boost/detail/interlocked.hpp @@ -2,10 +2,4 @@  #define BOOST_DETAIL_INTERLOCKED_HPP_INCLUDED -// MS compatible compilers support #pragma once - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif -  //  //  boost/detail/interlocked.hpp @@ -20,4 +14,9 @@  #include <boost/config.hpp> +// MS compatible compilers support #pragma once +#ifdef BOOST_HAS_PRAGMA_ONCE +#pragma once +#endif +  #if defined( BOOST_USE_WINDOWS_H ) @@ -32,4 +31,28 @@  # 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) @@ -72,5 +95,5 @@ extern "C" long __cdecl InterlockedExchangeAdd( long*, long );  #elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN ) -#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600 +#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1500  #include <intrin.h> @@ -94,10 +117,4 @@ extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );  #endif -# pragma intrinsic( _InterlockedIncrement ) -# pragma intrinsic( _InterlockedDecrement ) -# pragma intrinsic( _InterlockedCompareExchange ) -# pragma intrinsic( _InterlockedExchange ) -# pragma intrinsic( _InterlockedExchangeAdd ) -  # if defined(_M_IA64) || defined(_M_AMD64) @@ -105,7 +122,4 @@ extern "C" void* __cdecl _InterlockedCompareExchangePointer( void* volatile *, v  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 @@ -126,12 +140,28 @@ extern "C" void* __cdecl _InterlockedExchangePointer( void* volatile *, void* );  # define BOOST_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd +// Unlike __MINGW64__, __MINGW64_VERSION_MAJOR is defined by MinGW-w64 for both 32 and 64-bit targets. +#elif defined(__MINGW64_VERSION_MAJOR) + +// MinGW-w64 provides intrin.h for both 32 and 64-bit targets. +#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(__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 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ ) -#if defined(__MINGW64__) -#define BOOST_INTERLOCKED_IMPORT -#else  #define BOOST_INTERLOCKED_IMPORT __declspec(dllimport) -#endif -  namespace boost | 
 Swift
 Swift