Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78285 - in trunk/boost/thread: detail pthread
From: vicente.botet_at_[hidden]
Date: 2012-04-30 16:23:57


Author: viboes
Date: 2012-04-30 16:23:56 EDT (Mon, 30 Apr 2012)
New Revision: 78285
URL: http://svn.boost.org/trac/boost/changeset/78285

Log:
Thread: try to fix ticket 6130 for linux systems
Text files modified:
   trunk/boost/thread/detail/platform.hpp | 3 ++-
   trunk/boost/thread/pthread/condition_variable_fwd.hpp | 2 +-
   2 files changed, 3 insertions(+), 2 deletions(-)

Modified: trunk/boost/thread/detail/platform.hpp
==============================================================================
--- trunk/boost/thread/detail/platform.hpp (original)
+++ trunk/boost/thread/detail/platform.hpp 2012-04-30 16:23:56 EDT (Mon, 30 Apr 2012)
@@ -19,6 +19,7 @@
 // choose platform
 #if defined(linux) || defined(__linux) || defined(__linux__)
 # define BOOST_THREAD_LINUX
+# define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(100000)
 #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__)
 # define BOOST_THREAD_BSD
 #elif defined(sun) || defined(__sun)
@@ -35,7 +36,7 @@
 # define BOOST_THREAD_BEOS
 #elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
 # define BOOST_THREAD_MACOS
-# define BOOST_THREAD_WAIT_BUG
+# define BOOST_THREAD_WAIT_BUG boost::posix_time::microseconds(1000)
 #elif defined(__IBMCPP__) || defined(_AIX)
 # define BOOST_THREAD_AIX
 #elif defined(__amigaos__)

Modified: trunk/boost/thread/pthread/condition_variable_fwd.hpp
==============================================================================
--- trunk/boost/thread/pthread/condition_variable_fwd.hpp (original)
+++ trunk/boost/thread/pthread/condition_variable_fwd.hpp 2012-04-30 16:23:56 EDT (Mon, 30 Apr 2012)
@@ -71,7 +71,7 @@
             boost::system_time const& wait_until)
         {
 #if defined BOOST_THREAD_WAIT_BUG
- struct timespec const timeout=detail::get_timespec(wait_until+boost::posix_time::microseconds(1000));
+ struct timespec const timeout=detail::get_timespec(wait_until + BOOST_THREAD_WAIT_BUG);
             return do_timed_wait(m, timeout);
 #else
             struct timespec const timeout=detail::get_timespec(wait_until);


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk