summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-11-24 20:33:19 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-11-24 20:35:17 (GMT)
commit332d60c56dfaa11fdd135088279d15cd5983b3d4 (patch)
treedd77717a4e1732da929d5ff8a0471fa3f005e201 /3rdParty/Boost/src/boost/thread/detail
parent90c44a10fec26d2a0935b2d62e82b6a5be028373 (diff)
downloadswift-contrib-332d60c56dfaa11fdd135088279d15cd5983b3d4.zip
swift-contrib-332d60c56dfaa11fdd135088279d15cd5983b3d4.tar.bz2
Upgraded Boost to 1.45.0.
Diffstat (limited to '3rdParty/Boost/src/boost/thread/detail')
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/config.hpp8
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/platform.hpp2
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/thread.hpp43
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/thread_group.hpp7
-rw-r--r--3rdParty/Boost/src/boost/thread/detail/tss_hooks.hpp33
5 files changed, 57 insertions, 36 deletions
diff --git a/3rdParty/Boost/src/boost/thread/detail/config.hpp b/3rdParty/Boost/src/boost/thread/detail/config.hpp
index 7661507..4015a6c 100644
--- a/3rdParty/Boost/src/boost/thread/detail/config.hpp
+++ b/3rdParty/Boost/src/boost/thread/detail/config.hpp
@@ -19,8 +19,14 @@
#include "platform.hpp"
+// provided for backwards compatibility, since this
+// macro was used for several releases by mistake.
+#if defined(BOOST_THREAD_DYN_DLL)
+# define BOOST_THREAD_DYN_LINK
+#endif
+
// compatibility with the rest of Boost's auto-linking code:
-#if defined(BOOST_THREAD_DYN_DLL) || defined(BOOST_ALL_DYN_LINK)
+#if defined(BOOST_THREAD_DYN_LINK) || defined(BOOST_ALL_DYN_LINK)
# undef BOOST_THREAD_USE_LIB
# define BOOST_THREAD_USE_DLL
#endif
diff --git a/3rdParty/Boost/src/boost/thread/detail/platform.hpp b/3rdParty/Boost/src/boost/thread/detail/platform.hpp
index 4a37cf3..58601b0 100644
--- a/3rdParty/Boost/src/boost/thread/detail/platform.hpp
+++ b/3rdParty/Boost/src/boost/thread/detail/platform.hpp
@@ -29,7 +29,7 @@
# define BOOST_THREAD_HPUX
#elif defined(__CYGWIN__)
# define BOOST_THREAD_CYGWIN
-#elif defined(_WIN32) || defined(__WIN32__) || defined(WIN32)
+#elif (defined(_WIN32) || defined(__WIN32__) || defined(WIN32)) && !defined(BOOST_DISABLE_WIN32)
# define BOOST_THREAD_WIN32
#elif defined(__BEOS__)
# define BOOST_THREAD_BEOS
diff --git a/3rdParty/Boost/src/boost/thread/detail/thread.hpp b/3rdParty/Boost/src/boost/thread/detail/thread.hpp
index 9615a39..005555e 100644
--- a/3rdParty/Boost/src/boost/thread/detail/thread.hpp
+++ b/3rdParty/Boost/src/boost/thread/detail/thread.hpp
@@ -3,10 +3,12 @@
// 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)
-// (C) Copyright 2007-8 Anthony Williams
+// (C) Copyright 2007-10 Anthony Williams
#include <boost/thread/exceptions.hpp>
+#ifndef BOOST_NO_IOSTREAM
#include <ostream>
+#endif
#include <boost/thread/detail/move.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/thread/xtime.hpp>
@@ -113,14 +115,13 @@ namespace boost
void release_handle();
- mutable boost::mutex thread_info_mutex;
detail::thread_data_ptr thread_info;
void start_thread();
explicit thread(detail::thread_data_ptr data);
- detail::thread_data_ptr get_thread_info() const;
+ detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const;
#ifndef BOOST_NO_RVALUE_REFERENCES
template<typename F>
@@ -147,7 +148,7 @@ namespace boost
#endif
struct dummy;
public:
-#ifdef __SUNPRO_CC
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
thread(const volatile thread&);
#endif
thread();
@@ -157,7 +158,7 @@ namespace boost
#ifdef BOOST_MSVC
template <class F>
explicit thread(F f,typename disable_if<boost::is_convertible<F&,detail::thread_move_t<F> >, dummy* >::type=0):
- thread_info(make_thread_info(f))
+ thread_info(make_thread_info(static_cast<F&&>(f)))
{
start_thread();
}
@@ -217,7 +218,7 @@ namespace boost
x->thread_info.reset();
}
-#ifdef __SUNPRO_CC
+#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
thread& operator=(thread x)
{
swap(x);
@@ -394,7 +395,7 @@ namespace boost
thread_data(thread_data_)
{}
friend class thread;
- friend id this_thread::get_id();
+ friend id BOOST_THREAD_DECL this_thread::get_id();
public:
id():
thread_data()
@@ -430,6 +431,8 @@ namespace boost
return !(thread_data<y.thread_data);
}
+#ifndef BOOST_NO_IOSTREAM
+#ifndef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
template<class charT, class traits>
friend std::basic_ostream<charT, traits>&
operator<<(std::basic_ostream<charT, traits>& os, const id& x)
@@ -443,8 +446,34 @@ namespace boost
return os<<"{Not-any-thread}";
}
}
+#else
+ template<class charT, class traits>
+ std::basic_ostream<charT, traits>&
+ print(std::basic_ostream<charT, traits>& os) const
+ {
+ if(thread_data)
+ {
+ return os<<thread_data;
+ }
+ else
+ {
+ return os<<"{Not-any-thread}";
+ }
+ }
+
+#endif
+#endif
};
+#if !defined(BOOST_NO_IOSTREAM) && defined(BOOST_NO_MEMBER_TEMPLATE_FRIENDS)
+ template<class charT, class traits>
+ std::basic_ostream<charT, traits>&
+ operator<<(std::basic_ostream<charT, traits>& os, const thread::id& x)
+ {
+ return x.print(os);
+ }
+#endif
+
inline bool thread::operator==(const thread& other) const
{
return get_id()==other.get_id();
diff --git a/3rdParty/Boost/src/boost/thread/detail/thread_group.hpp b/3rdParty/Boost/src/boost/thread/detail/thread_group.hpp
index 823b92e..f1ccdf8 100644
--- a/3rdParty/Boost/src/boost/thread/detail/thread_group.hpp
+++ b/3rdParty/Boost/src/boost/thread/detail/thread_group.hpp
@@ -18,10 +18,13 @@
namespace boost
{
- class thread_group:
- private noncopyable
+ class thread_group
{
+ private:
+ thread_group(thread_group const&);
+ thread_group& operator=(thread_group const&);
public:
+ thread_group() {}
~thread_group()
{
for(std::list<thread*>::iterator it=threads.begin(),end=threads.end();
diff --git a/3rdParty/Boost/src/boost/thread/detail/tss_hooks.hpp b/3rdParty/Boost/src/boost/thread/detail/tss_hooks.hpp
index c496844..b2ceece 100644
--- a/3rdParty/Boost/src/boost/thread/detail/tss_hooks.hpp
+++ b/3rdParty/Boost/src/boost/thread/detail/tss_hooks.hpp
@@ -12,27 +12,9 @@
#if defined(BOOST_HAS_WINTHREADS)
- typedef void (__cdecl *thread_exit_handler)(void);
-
- extern "C" BOOST_THREAD_DECL int at_thread_exit(
- thread_exit_handler exit_handler
- );
- //Add a function to the list of functions that will
- //be called when a thread is about to exit.
- //Currently only implemented for Win32, but should
- //later be implemented for all platforms.
- //Used by Win32 implementation of Boost.Threads
- //tss to perform cleanup.
- //Like the C runtime library atexit() function,
- //which it mimics, at_thread_exit() returns
- //zero if successful and a nonzero
- //value if an error occurs.
-
-#endif //defined(BOOST_HAS_WINTHREADS)
-
-#if defined(BOOST_HAS_WINTHREADS)
-
- extern "C" BOOST_THREAD_DECL void on_process_enter(void);
+namespace boost
+{
+ BOOST_THREAD_DECL void __cdecl on_process_enter(void);
//Function to be called when the exe or dll
//that uses Boost.Threads first starts
//or is first loaded.
@@ -42,7 +24,7 @@
//a method for doing so has been discovered.
//May be omitted; may be called multiple times.
- extern "C" BOOST_THREAD_DECL void on_process_exit(void);
+ BOOST_THREAD_DECL void __cdecl on_process_exit(void);
//Function to be called when the exe or dll
//that uses Boost.Threads first starts
//or is first loaded.
@@ -52,7 +34,7 @@
//a method for doing so has been discovered.
//Must not be omitted; may be called multiple times.
- extern "C" BOOST_THREAD_DECL void on_thread_enter(void);
+ BOOST_THREAD_DECL void __cdecl on_thread_enter(void);
//Function to be called just after a thread starts
//in an exe or dll that uses Boost.Threads.
//Must be called in the context of the thread
@@ -61,7 +43,7 @@
//a method for doing so has been discovered.
//May be omitted; may be called multiple times.
- extern "C" BOOST_THREAD_DECL void __cdecl on_thread_exit(void);
+ BOOST_THREAD_DECL void __cdecl on_thread_exit(void);
//Function to be called just be fore a thread ends
//in an exe or dll that uses Boost.Threads.
//Must be called in the context of the thread
@@ -70,10 +52,11 @@
//a method for doing so has been discovered.
//Must not be omitted; may be called multiple times.
- extern "C" void tss_cleanup_implemented(void);
+ void tss_cleanup_implemented();
//Dummy function used both to detect whether tss cleanup
//cleanup has been implemented and to force
//it to be linked into the Boost.Threads library.
+}
#endif //defined(BOOST_HAS_WINTHREADS)