diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-11-24 20:33:19 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-11-24 20:35:17 (GMT) |
commit | 332d60c56dfaa11fdd135088279d15cd5983b3d4 (patch) | |
tree | dd77717a4e1732da929d5ff8a0471fa3f005e201 /3rdParty/Boost/src/boost/thread/win32/thread_data.hpp | |
parent | 90c44a10fec26d2a0935b2d62e82b6a5be028373 (diff) | |
download | swift-contrib-332d60c56dfaa11fdd135088279d15cd5983b3d4.zip swift-contrib-332d60c56dfaa11fdd135088279d15cd5983b3d4.tar.bz2 |
Upgraded Boost to 1.45.0.
Diffstat (limited to '3rdParty/Boost/src/boost/thread/win32/thread_data.hpp')
-rw-r--r-- | 3rdParty/Boost/src/boost/thread/win32/thread_data.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/3rdParty/Boost/src/boost/thread/win32/thread_data.hpp b/3rdParty/Boost/src/boost/thread/win32/thread_data.hpp index 1a6a1e0..c86b0fa 100644 --- a/3rdParty/Boost/src/boost/thread/win32/thread_data.hpp +++ b/3rdParty/Boost/src/boost/thread/win32/thread_data.hpp @@ -144,6 +144,11 @@ namespace boost start(0),milliseconds(~uintmax_t(0)),relative(true) {} }; + + inline unsigned long pin_to_zero(long value) + { + return (value<0)?0u:(unsigned long)value; + } } namespace this_thread @@ -163,7 +168,7 @@ namespace boost template<typename TimeDuration> inline void sleep(TimeDuration const& rel_time) { - interruptible_wait(static_cast<unsigned long>(rel_time.total_milliseconds())); + interruptible_wait(detail::pin_to_zero(rel_time.total_milliseconds())); } inline void sleep(system_time const& abs_time) { |