Mercurial > hg > vamp-build-and-test
diff DEPENDENCIES/generic/include/boost/interprocess/sync/posix/condition.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/interprocess/sync/posix/condition.hpp Fri Sep 04 12:01:02 2015 +0100 +++ b/DEPENDENCIES/generic/include/boost/interprocess/sync/posix/condition.hpp Mon Sep 07 11:12:49 2015 +0100 @@ -11,7 +11,11 @@ #ifndef BOOST_INTERPROCESS_POSIX_CONDITION_HPP #define BOOST_INTERPROCESS_POSIX_CONDITION_HPP -#if (defined _MSC_VER) && (_MSC_VER >= 1200) +#ifndef BOOST_CONFIG_HPP +# include <boost/config.hpp> +#endif +# +#if defined(BOOST_HAS_PRAGMA_ONCE) # pragma once #endif @@ -83,12 +87,13 @@ template <typename L> bool timed_wait(L& lock, const boost::posix_time::ptime &abs_time) { + if (!lock) + throw lock_exception(); + //Posix does not support infinity absolute time so handle it here if(abs_time == boost::posix_time::pos_infin){ this->wait(lock); return true; } - if (!lock) - throw lock_exception(); return this->do_timed_wait(abs_time, *lock.mutex()); } @@ -98,17 +103,17 @@ template <typename L, typename Pr> bool timed_wait(L& lock, const boost::posix_time::ptime &abs_time, Pr pred) { + if (!lock) + throw lock_exception(); + //Posix does not support infinity absolute time so handle it here if(abs_time == boost::posix_time::pos_infin){ this->wait(lock, pred); return true; } - if (!lock) - throw lock_exception(); while (!pred()){ if (!this->do_timed_wait(abs_time, *lock.mutex())) return pred(); } - return true; }