summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2014-10-19 20:22:58 (GMT)
committerTobias Markmann <tm@ayena.de>2014-10-20 13:49:33 (GMT)
commit6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch)
tree2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/smart_ptr/detail/sp_interlocked.hpp
parent38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff)
downloadswift-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip
swift-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/smart_ptr/detail/sp_interlocked.hpp')
-rw-r--r--3rdParty/Boost/src/boost/smart_ptr/detail/sp_interlocked.hpp152
1 files changed, 152 insertions, 0 deletions
diff --git a/3rdParty/Boost/src/boost/smart_ptr/detail/sp_interlocked.hpp b/3rdParty/Boost/src/boost/smart_ptr/detail/sp_interlocked.hpp
new file mode 100644
index 0000000..814b0c2
--- /dev/null
+++ b/3rdParty/Boost/src/boost/smart_ptr/detail/sp_interlocked.hpp
@@ -0,0 +1,152 @@
+#ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
+#define BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED
+
+// MS compatible compilers support #pragma once
+
+#if defined(_MSC_VER) && (_MSC_VER >= 1020)
+# pragma once
+#endif
+
+//
+// boost/detail/sp_interlocked.hpp
+//
+// Copyright 2005, 2014 Peter Dimov
+//
+// Distributed under the Boost Software License, Version 1.0.
+// See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt
+//
+
+#include <boost/config.hpp>
+
+// BOOST_SP_HAS_INTRIN_H
+
+// VC9 has intrin.h, but it collides with <utility>
+#if defined( BOOST_MSVC ) && BOOST_MSVC >= 1600
+
+# define BOOST_SP_HAS_INTRIN_H
+
+// 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.
+# define BOOST_SP_HAS_INTRIN_H
+
+// Intel C++ on Windows on VC10+ stdlib
+#elif defined( BOOST_INTEL_WIN ) && defined( _CPPLIB_VER ) && _CPPLIB_VER >= 520
+
+# define BOOST_SP_HAS_INTRIN_H
+
+#endif
+
+#if defined( BOOST_USE_WINDOWS_H )
+
+# include <windows.h>
+
+# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
+
+#elif defined( BOOST_USE_INTRIN_H ) || defined( BOOST_SP_HAS_INTRIN_H )
+
+#include <intrin.h>
+
+# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#elif defined( _WIN32_WCE )
+
+#if _WIN32_WCE >= 0x600
+
+extern "C" long __cdecl _InterlockedIncrement( long volatile * );
+extern "C" long __cdecl _InterlockedDecrement( long volatile * );
+extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
+
+# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#else
+
+// under Windows CE we still have old-style Interlocked* functions
+
+extern "C" long __cdecl InterlockedIncrement( long* );
+extern "C" long __cdecl InterlockedDecrement( long* );
+extern "C" long __cdecl InterlockedCompareExchange( long*, long, long );
+extern "C" long __cdecl InterlockedExchange( long*, long );
+extern "C" long __cdecl InterlockedExchangeAdd( long*, long );
+
+# define BOOST_SP_INTERLOCKED_INCREMENT InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD InterlockedExchangeAdd
+
+#endif
+
+#elif defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )
+
+#if 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 * );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchange( long volatile *, long );
+extern "C" long __CLRCALL_PURE_OR_CDECL _InterlockedExchangeAdd( long volatile *, long );
+
+#else
+
+extern "C" long __cdecl _InterlockedIncrement( long volatile * );
+extern "C" long __cdecl _InterlockedDecrement( long volatile * );
+extern "C" long __cdecl _InterlockedCompareExchange( long volatile *, long, long );
+extern "C" long __cdecl _InterlockedExchange( long volatile *, long );
+extern "C" long __cdecl _InterlockedExchangeAdd( long volatile *, long );
+
+#endif
+
+# define BOOST_SP_INTERLOCKED_INCREMENT _InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT _InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE _InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE _InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD _InterlockedExchangeAdd
+
+#elif defined( WIN32 ) || defined( _WIN32 ) || defined( __WIN32__ ) || defined( __CYGWIN__ )
+
+namespace boost
+{
+
+namespace detail
+{
+
+extern "C" __declspec(dllimport) long __stdcall InterlockedIncrement( long volatile * );
+extern "C" __declspec(dllimport) long __stdcall InterlockedDecrement( long volatile * );
+extern "C" __declspec(dllimport) long __stdcall InterlockedCompareExchange( long volatile *, long, long );
+extern "C" __declspec(dllimport) long __stdcall InterlockedExchange( long volatile *, long );
+extern "C" __declspec(dllimport) long __stdcall InterlockedExchangeAdd( long volatile *, long );
+
+} // namespace detail
+
+} // namespace boost
+
+# define BOOST_SP_INTERLOCKED_INCREMENT ::boost::detail::InterlockedIncrement
+# define BOOST_SP_INTERLOCKED_DECREMENT ::boost::detail::InterlockedDecrement
+# define BOOST_SP_INTERLOCKED_COMPARE_EXCHANGE ::boost::detail::InterlockedCompareExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE ::boost::detail::InterlockedExchange
+# define BOOST_SP_INTERLOCKED_EXCHANGE_ADD ::boost::detail::InterlockedExchangeAdd
+
+#else
+
+# error "Interlocked intrinsics not available"
+
+#endif
+
+#endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_INTERLOCKED_HPP_INCLUDED