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/boost/thread/pthread | |
parent | 6f49e5abee37d37b351d68c01374232eccdac458 (diff) | |
download | swift-contrib-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.zip swift-contrib-d76ada0ab59634e3333f9eb5a92d0e850f60d7bf.tar.bz2 |
Updated Boost to 1.43.0.
Diffstat (limited to '3rdParty/Boost/src/boost/thread/pthread')
6 files changed, 25 insertions, 17 deletions
diff --git a/3rdParty/Boost/src/boost/thread/pthread/condition_variable.hpp b/3rdParty/Boost/src/boost/thread/pthread/condition_variable.hpp index 8ec6ae7..8e8f5b5 100644 --- a/3rdParty/Boost/src/boost/thread/pthread/condition_variable.hpp +++ b/3rdParty/Boost/src/boost/thread/pthread/condition_variable.hpp @@ -57,13 +57,13 @@ namespace boost int const res=pthread_mutex_init(&internal_mutex,NULL); if(res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } int const res2=pthread_cond_init(&cond,NULL); if(res2) { BOOST_VERIFY(!pthread_mutex_destroy(&internal_mutex)); - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } } ~condition_variable_any() @@ -87,7 +87,7 @@ namespace boost } if(res) { - throw condition_error(); + boost::throw_exception(condition_error()); } } @@ -117,7 +117,7 @@ namespace boost } if(res) { - throw condition_error(); + boost::throw_exception(condition_error()); } return true; } diff --git a/3rdParty/Boost/src/boost/thread/pthread/condition_variable_fwd.hpp b/3rdParty/Boost/src/boost/thread/pthread/condition_variable_fwd.hpp index 4048cdf..59908f4 100644 --- a/3rdParty/Boost/src/boost/thread/pthread/condition_variable_fwd.hpp +++ b/3rdParty/Boost/src/boost/thread/pthread/condition_variable_fwd.hpp @@ -6,6 +6,7 @@ // (C) Copyright 2007-8 Anthony Williams #include <boost/assert.hpp> +#include <boost/throw_exception.hpp> #include <pthread.h> #include <boost/thread/mutex.hpp> #include <boost/thread/locks.hpp> @@ -30,7 +31,7 @@ namespace boost int const res=pthread_cond_init(&cond,NULL); if(res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } } ~condition_variable() diff --git a/3rdParty/Boost/src/boost/thread/pthread/mutex.hpp b/3rdParty/Boost/src/boost/thread/pthread/mutex.hpp index 51d62ae..1f7f790 100644 --- a/3rdParty/Boost/src/boost/thread/pthread/mutex.hpp +++ b/3rdParty/Boost/src/boost/thread/pthread/mutex.hpp @@ -7,6 +7,7 @@ #include <pthread.h> #include <boost/utility.hpp> +#include <boost/throw_exception.hpp> #include <boost/thread/exceptions.hpp> #include <boost/thread/locks.hpp> #include <boost/thread/thread_time.hpp> @@ -37,7 +38,7 @@ namespace boost int const res=pthread_mutex_init(&m,NULL); if(res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } } ~mutex() @@ -89,14 +90,14 @@ namespace boost int const res=pthread_mutex_init(&m,NULL); if(res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } #ifndef BOOST_PTHREAD_HAS_TIMEDLOCK int const res2=pthread_cond_init(&cond,NULL); if(res2) { BOOST_VERIFY(!pthread_mutex_destroy(&m)); - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } is_locked=false; #endif diff --git a/3rdParty/Boost/src/boost/thread/pthread/once.hpp b/3rdParty/Boost/src/boost/thread/pthread/once.hpp index f278a57..6321aa2 100644 --- a/3rdParty/Boost/src/boost/thread/pthread/once.hpp +++ b/3rdParty/Boost/src/boost/thread/pthread/once.hpp @@ -10,6 +10,7 @@ // http://www.boost.org/LICENSE_1_0.txt) #include <boost/thread/detail/config.hpp> +#include <boost/config.hpp> #include <pthread.h> #include <boost/assert.hpp> @@ -58,10 +59,13 @@ namespace boost if(flag.epoch==uninitialized_flag) { flag.epoch=being_initialized; +#ifndef BOOST_NO_EXCEPTIONS try { +#endif pthread::pthread_mutex_scoped_unlock relocker(&detail::once_epoch_mutex); f(); +#ifndef BOOST_NO_EXCEPTIONS } catch(...) { @@ -69,6 +73,7 @@ namespace boost BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv)); throw; } +#endif flag.epoch=--detail::once_global_epoch; BOOST_VERIFY(!pthread_cond_broadcast(&detail::once_epoch_cv)); } diff --git a/3rdParty/Boost/src/boost/thread/pthread/recursive_mutex.hpp b/3rdParty/Boost/src/boost/thread/pthread/recursive_mutex.hpp index f3f7bf1..ad3b7e1 100644 --- a/3rdParty/Boost/src/boost/thread/pthread/recursive_mutex.hpp +++ b/3rdParty/Boost/src/boost/thread/pthread/recursive_mutex.hpp @@ -7,6 +7,7 @@ #include <pthread.h> #include <boost/utility.hpp> +#include <boost/throw_exception.hpp> #include <boost/thread/exceptions.hpp> #include <boost/thread/locks.hpp> #include <boost/thread/thread_time.hpp> @@ -42,18 +43,18 @@ namespace boost int const init_attr_res=pthread_mutexattr_init(&attr); if(init_attr_res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); if(set_attr_res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } int const res=pthread_mutex_init(&m,&attr); if(res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } BOOST_VERIFY(!pthread_mutexattr_destroy(&attr)); } @@ -111,32 +112,32 @@ namespace boost int const init_attr_res=pthread_mutexattr_init(&attr); if(init_attr_res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } int const set_attr_res=pthread_mutexattr_settype(&attr,PTHREAD_MUTEX_RECURSIVE); if(set_attr_res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } int const res=pthread_mutex_init(&m,&attr); if(res) { BOOST_VERIFY(!pthread_mutexattr_destroy(&attr)); - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } BOOST_VERIFY(!pthread_mutexattr_destroy(&attr)); #else int const res=pthread_mutex_init(&m,NULL); if(res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } int const res2=pthread_cond_init(&cond,NULL); if(res2) { BOOST_VERIFY(!pthread_mutex_destroy(&m)); - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } is_locked=false; count=0; diff --git a/3rdParty/Boost/src/boost/thread/pthread/thread_heap_alloc.hpp b/3rdParty/Boost/src/boost/thread/pthread/thread_heap_alloc.hpp index 7cc0aa0..737c298 100644 --- a/3rdParty/Boost/src/boost/thread/pthread/thread_heap_alloc.hpp +++ b/3rdParty/Boost/src/boost/thread/pthread/thread_heap_alloc.hpp @@ -17,7 +17,7 @@ namespace boost return new T(); } -#ifdef BOOST_HAS_RVALUE_REFS +#ifndef BOOST_NO_RVALUE_REFERENCES template<typename T,typename A1> inline T* heap_new(A1&& a1) { |