diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-05-06 17:44:27 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-05-06 17:44:27 (GMT) |
commit | d76ada0ab59634e3333f9eb5a92d0e850f60d7bf (patch) | |
tree | 5eaae441173fad2ec19ba67d6589f28ecd740991 /3rdParty/Boost/src/libs/thread | |
parent | 6f49e5abee37d37b351d68c01374232eccdac458 (diff) | |
download | swift-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.zip swift-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.tar.bz2 |
Updated Boost to 1.43.0.
Diffstat (limited to '3rdParty/Boost/src/libs/thread')
-rw-r--r-- | 3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp | 3 | ||||
-rw-r--r-- | 3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl | 11 | ||||
-rw-r--r-- | 3rdParty/Boost/src/libs/thread/src/win32/thread.cpp | 3 |
3 files changed, 11 insertions, 6 deletions
diff --git a/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp b/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp index 3a5ce7c..1c13a9a 100644 --- a/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp +++ b/3rdParty/Boost/src/libs/thread/src/pthread/thread.cpp @@ -13,6 +13,7 @@ #include <boost/thread/locks.hpp> #include <boost/thread/once.hpp> #include <boost/thread/tss.hpp> +#include <boost/throw_exception.hpp> #ifdef __linux__ #include <sys/sysinfo.h> #elif defined(__APPLE__) || defined(__FreeBSD__) @@ -186,7 +187,7 @@ namespace boost if (res != 0) { thread_info->self.reset(); - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } } diff --git a/3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl b/3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl index 5ec3b17..b75a135 100644 --- a/3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl +++ b/3rdParty/Boost/src/libs/thread/src/pthread/timeconv.inl @@ -1,11 +1,14 @@ // Copyright (C) 2001-2003 // William E. Kempf +// Copyright (C) 2009 Anthony Williams // // 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) // boostinspect:nounnamed +#include <boost/assert.hpp> + namespace { const int MILLISECONDS_PER_SECOND = 1000; const int NANOSECONDS_PER_SECOND = 1000000000; @@ -18,7 +21,7 @@ inline void to_time(int milliseconds, boost::xtime& xt) { int res = 0; res = boost::xtime_get(&xt, boost::TIME_UTC); - assert(res == boost::TIME_UTC); + BOOST_ASSERT(res == boost::TIME_UTC); xt.sec += (milliseconds / MILLISECONDS_PER_SECOND); xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) * @@ -55,7 +58,7 @@ inline void to_timespec_duration(const boost::xtime& xt, timespec& ts) boost::xtime cur; int res = 0; res = boost::xtime_get(&cur, boost::TIME_UTC); - assert(res == boost::TIME_UTC); + BOOST_ASSERT(res == boost::TIME_UTC); if (boost::xtime_cmp(xt, cur) <= 0) { @@ -86,7 +89,7 @@ inline void to_duration(boost::xtime xt, int& milliseconds) boost::xtime cur; int res = 0; res = boost::xtime_get(&cur, boost::TIME_UTC); - assert(res == boost::TIME_UTC); + BOOST_ASSERT(res == boost::TIME_UTC); if (boost::xtime_cmp(xt, cur) <= 0) milliseconds = 0; @@ -108,7 +111,7 @@ inline void to_microduration(boost::xtime xt, int& microseconds) boost::xtime cur; int res = 0; res = boost::xtime_get(&cur, boost::TIME_UTC); - assert(res == boost::TIME_UTC); + BOOST_ASSERT(res == boost::TIME_UTC); if (boost::xtime_cmp(xt, cur) <= 0) microseconds = 0; diff --git a/3rdParty/Boost/src/libs/thread/src/win32/thread.cpp b/3rdParty/Boost/src/libs/thread/src/win32/thread.cpp index 46af860..b85e650 100644 --- a/3rdParty/Boost/src/libs/thread/src/win32/thread.cpp +++ b/3rdParty/Boost/src/libs/thread/src/win32/thread.cpp @@ -17,6 +17,7 @@ #include <boost/thread/once.hpp> #include <boost/thread/tss.hpp> #include <boost/assert.hpp> +#include <boost/throw_exception.hpp> #include <boost/thread/detail/tss_hooks.hpp> #include <boost/date_time/posix_time/conversion.hpp> @@ -188,7 +189,7 @@ namespace boost uintptr_t const new_thread=_beginthreadex(0,0,&thread_start_function,thread_info.get(),CREATE_SUSPENDED,&thread_info->id); if(!new_thread) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } intrusive_ptr_add_ref(thread_info.get()); thread_info->thread_handle=(detail::win32::handle)(new_thread); |