summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '3rdParty/Boost/src/boost/thread')
-rw-r--r--3rdParty/Boost/src/boost/thread/pthread/condition_variable.hpp36
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/thread_data.hpp6
-rw-r--r--3rdParty/Boost/src/boost/thread/win32/thread_heap_alloc.hpp4
3 files changed, 29 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 9c5bee2..160c707 100644
--- a/3rdParty/Boost/src/boost/thread/pthread/condition_variable.hpp
+++ b/3rdParty/Boost/src/boost/thread/pthread/condition_variable.hpp
@@ -47,27 +47,39 @@ namespace boost
inline void condition_variable::wait(unique_lock<mutex>& m)
{
- thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard;
- detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
- guard.activate(m);
- int const res=pthread_cond_wait(&cond,&internal_mutex);
- BOOST_ASSERT(!res);
+ int res=0;
+ {
+ thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard;
+ detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+ guard.activate(m);
+ res=pthread_cond_wait(&cond,&internal_mutex);
+ }
this_thread::interruption_point();
+ if(res)
+ {
+ boost::throw_exception(condition_error());
+ }
}
inline bool condition_variable::timed_wait(unique_lock<mutex>& m,boost::system_time const& wait_until)
{
thread_cv_detail::lock_on_exit<unique_lock<mutex> > guard;
- detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
- guard.activate(m);
- struct timespec const timeout=detail::get_timespec(wait_until);
- int const cond_res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout);
+ int cond_res;
+ {
+ detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
+ guard.activate(m);
+ struct timespec const timeout=detail::get_timespec(wait_until);
+ cond_res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout);
+ }
this_thread::interruption_point();
if(cond_res==ETIMEDOUT)
{
return false;
}
- BOOST_ASSERT(!cond_res);
+ if(cond_res)
+ {
+ boost::throw_exception(condition_error());
+ }
return true;
}
@@ -121,8 +133,8 @@ namespace boost
detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
guard.activate(m);
res=pthread_cond_wait(&cond,&internal_mutex);
- this_thread::interruption_point();
}
+ this_thread::interruption_point();
if(res)
{
boost::throw_exception(condition_error());
@@ -145,8 +157,8 @@ namespace boost
detail::interruption_checker check_for_interruption(&internal_mutex,&cond);
guard.activate(m);
res=pthread_cond_timedwait(&cond,&internal_mutex,&timeout);
- this_thread::interruption_point();
}
+ this_thread::interruption_point();
if(res==ETIMEDOUT)
{
return false;
diff --git a/3rdParty/Boost/src/boost/thread/win32/thread_data.hpp b/3rdParty/Boost/src/boost/thread/win32/thread_data.hpp
index c86b0fa..1f69aa0 100644
--- a/3rdParty/Boost/src/boost/thread/win32/thread_data.hpp
+++ b/3rdParty/Boost/src/boost/thread/win32/thread_data.hpp
@@ -145,9 +145,9 @@ namespace boost
{}
};
- inline unsigned long pin_to_zero(long value)
+ inline uintmax_t pin_to_zero(intmax_t value)
{
- return (value<0)?0u:(unsigned long)value;
+ return (value<0)?0u:(uintmax_t)value;
}
}
@@ -156,7 +156,7 @@ namespace boost
void BOOST_THREAD_DECL yield();
bool BOOST_THREAD_DECL interruptible_wait(detail::win32::handle handle_to_wait_for,detail::timeout target_time);
- inline void interruptible_wait(unsigned long milliseconds)
+ inline void interruptible_wait(uintmax_t milliseconds)
{
interruptible_wait(detail::win32::invalid_handle_value,milliseconds);
}
diff --git a/3rdParty/Boost/src/boost/thread/win32/thread_heap_alloc.hpp b/3rdParty/Boost/src/boost/thread/win32/thread_heap_alloc.hpp
index c210a91..b70623a 100644
--- a/3rdParty/Boost/src/boost/thread/win32/thread_heap_alloc.hpp
+++ b/3rdParty/Boost/src/boost/thread/win32/thread_heap_alloc.hpp
@@ -56,7 +56,7 @@ namespace boost
{
namespace detail
{
- inline /*BOOST_THREAD_DECL*/ void* allocate_raw_heap_memory(unsigned size)
+ inline BOOST_THREAD_DECL void* allocate_raw_heap_memory(unsigned size)
{
void* const heap_memory=detail::win32::HeapAlloc(detail::win32::GetProcessHeap(),0,size);
if(!heap_memory)
@@ -66,7 +66,7 @@ namespace boost
return heap_memory;
}
- inline /*BOOST_THREAD_DECL*/ void free_raw_heap_memory(void* heap_memory)
+ inline BOOST_THREAD_DECL void free_raw_heap_memory(void* heap_memory)
{
BOOST_VERIFY(detail::win32::HeapFree(detail::win32::GetProcessHeap(),0,heap_memory)!=0);
}