diff -r 510d5bd079ad boost/thread/locks.hpp --- a/boost/thread/locks.hpp Fri Jun 27 15:59:57 2008 -0600 +++ b/boost/thread/locks.hpp Mon Jun 30 18:24:01 2008 -0600 @@ -137,7 +137,7 @@ { if(owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } m->lock(); is_locked=true; @@ -146,7 +146,7 @@ { if(owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } is_locked=m->try_lock(); return is_locked; @@ -167,7 +167,7 @@ { if(!owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } m->unlock(); is_locked=false; @@ -323,7 +323,7 @@ { if(owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } m->lock_shared(); is_locked=true; @@ -332,7 +332,7 @@ { if(owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } is_locked=m->try_lock_shared(); return is_locked; @@ -341,7 +341,7 @@ { if(owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } is_locked=m->timed_lock_shared(target_time); return is_locked; @@ -350,7 +350,7 @@ { if(!owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } m->unlock_shared(); is_locked=false; @@ -466,7 +466,7 @@ { if(owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } m->lock_upgrade(); is_locked=true; @@ -475,7 +475,7 @@ { if(owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } is_locked=m->try_lock_upgrade(); return is_locked; @@ -484,7 +484,7 @@ { if(!owns_lock()) { - throw boost::lock_error(); + boost::throw_exception(boost::lock_error()); } m->unlock_upgrade(); is_locked=false; diff -r 510d5bd079ad boost/thread/pthread/condition_variable.hpp --- a/boost/thread/pthread/condition_variable.hpp Fri Jun 27 15:59:57 2008 -0600 +++ b/boost/thread/pthread/condition_variable.hpp Mon Jun 30 18:24:01 2008 -0600 @@ -7,6 +7,7 @@ #include #include +#include #include #include #include "timespec.hpp" @@ -21,7 +22,7 @@ int const res=pthread_cond_init(&cond,NULL); if(res) { - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } } inline condition_variable::~condition_variable() @@ -72,13 +73,13 @@ 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() @@ -102,7 +103,7 @@ } if(res) { - throw condition_error(); + boost::throw_exception(condition_error()); } } @@ -132,7 +133,7 @@ } if(res) { - throw condition_error(); + boost::throw_exception(condition_error()); } return true; } diff -r 510d5bd079ad boost/thread/pthread/mutex.hpp --- a/boost/thread/pthread/mutex.hpp Fri Jun 27 15:59:57 2008 -0600 +++ b/boost/thread/pthread/mutex.hpp Mon Jun 30 18:24:01 2008 -0600 @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -37,7 +38,7 @@ 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 @@ 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 -r 510d5bd079ad boost/thread/pthread/once.hpp --- a/boost/thread/pthread/once.hpp Fri Jun 27 15:59:57 2008 -0600 +++ b/boost/thread/pthread/once.hpp Mon Jun 30 18:24:01 2008 -0600 @@ -10,6 +10,7 @@ // http://www.boost.org/LICENSE_1_0.txt) #include +#include #include #include @@ -55,10 +56,13 @@ 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(...) { @@ -66,6 +70,7 @@ 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 -r 510d5bd079ad boost/thread/pthread/recursive_mutex.hpp --- a/boost/thread/pthread/recursive_mutex.hpp Fri Jun 27 15:59:57 2008 -0600 +++ b/boost/thread/pthread/recursive_mutex.hpp Mon Jun 30 18:24:01 2008 -0600 @@ -7,6 +7,7 @@ #include #include +#include #include #include #include @@ -40,18 +41,18 @@ 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)); } @@ -102,32 +103,32 @@ 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 -r 510d5bd079ad boost/thread/pthread/thread_data.hpp --- a/boost/thread/pthread/thread_data.hpp Fri Jun 27 15:59:57 2008 -0600 +++ b/boost/thread/pthread/thread_data.hpp Mon Jun 30 18:24:01 2008 -0600 @@ -10,12 +10,13 @@ #include #include #include +#include #include #include "condition_variable_fwd.hpp" namespace boost { - class thread_interrupted + class thread_interrupted : public std::exception {}; namespace detail @@ -68,7 +69,7 @@ if(thread_info->interrupt_requested) { thread_info->interrupt_requested=false; - throw thread_interrupted(); + boost::throw_exception(thread_interrupted()); } } diff -r 510d5bd079ad libs/thread/src/pthread/thread.cpp --- a/libs/thread/src/pthread/thread.cpp Fri Jun 27 15:59:57 2008 -0600 +++ b/libs/thread/src/pthread/thread.cpp Mon Jun 30 18:24:01 2008 -0600 @@ -13,6 +13,7 @@ #include #include #include +#include #ifdef __linux__ #include #elif defined(__APPLE__) || defined(__FreeBSD__) @@ -187,7 +188,7 @@ if (res != 0) { thread_info->self.reset(); - throw thread_resource_error(); + boost::throw_exception(thread_resource_error()); } } @@ -491,7 +492,7 @@ if(thread_info->interrupt_requested) { thread_info->interrupt_requested=false; - throw thread_interrupted(); + boost::throw_exception(thread_interrupted()); } } }