Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82757 - in trunk: boost/thread libs/thread/src/pthread
From: vicente.botet_at_[hidden]
Date: 2013-02-06 20:26:23


Author: viboes
Date: 2013-02-06 01:40:30 EST (Wed, 06 Feb 2013)
New Revision: 82757
URL: http://svn.boost.org/trac/boost/changeset/82757

Log:
Thread: make the pthread binary to don't depend on shared_mutex.hpp + #7982
Added:
   trunk/boost/thread/thread_only.hpp (contents, props changed)
Text files modified:
   trunk/boost/thread/future.hpp | 2 +-
   trunk/boost/thread/thread.hpp | 16 +---------------
   trunk/libs/thread/src/pthread/thread.cpp | 6 +++++-
   3 files changed, 7 insertions(+), 17 deletions(-)

Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2013-02-06 01:40:30 EST (Wed, 06 Feb 2013)
@@ -56,7 +56,7 @@
 #endif
 
 #include <boost/utility/result_of.hpp>
-#include <boost/thread/thread.hpp>
+#include <boost/thread/thread_only.hpp>
 
 #if defined BOOST_THREAD_PROVIDES_FUTURE
 #define BOOST_THREAD_FUTURE future

Modified: trunk/boost/thread/thread.hpp
==============================================================================
--- trunk/boost/thread/thread.hpp (original)
+++ trunk/boost/thread/thread.hpp 2013-02-06 01:40:30 EST (Wed, 06 Feb 2013)
@@ -9,22 +9,8 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include <boost/thread/detail/platform.hpp>
-
-#if defined(BOOST_THREAD_PLATFORM_WIN32)
-#include <boost/thread/win32/thread_data.hpp>
-#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
-#include <boost/thread/pthread/thread_data.hpp>
-#else
-#error "Boost threads unavailable on this platform"
-#endif
-
-#include <boost/thread/detail/thread.hpp>
-#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
-#include <boost/thread/detail/thread_interruption.hpp>
-#endif
+#include <boost/thread/thread_only.hpp>
 #include <boost/thread/detail/thread_group.hpp>
-#include <boost/thread/v2/thread.hpp>
 
 
 #endif

Added: trunk/boost/thread/thread_only.hpp
==============================================================================
--- (empty file)
+++ trunk/boost/thread/thread_only.hpp 2013-02-06 01:40:30 EST (Wed, 06 Feb 2013)
@@ -0,0 +1,29 @@
+#ifndef BOOST_THREAD_THREAD_ONLY_HPP
+#define BOOST_THREAD_THREAD_ONLY_HPP
+
+// thread.hpp
+//
+// (C) Copyright 2013 Vicente J. Botet Escriba
+//
+// Distributed under the Boost Software License, Version 1.0. (See
+// accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+
+#include <boost/thread/detail/platform.hpp>
+
+#if defined(BOOST_THREAD_PLATFORM_WIN32)
+#include <boost/thread/win32/thread_data.hpp>
+#elif defined(BOOST_THREAD_PLATFORM_PTHREAD)
+#include <boost/thread/pthread/thread_data.hpp>
+#else
+#error "Boost threads unavailable on this platform"
+#endif
+
+#include <boost/thread/detail/thread.hpp>
+#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
+#include <boost/thread/detail/thread_interruption.hpp>
+#endif
+#include <boost/thread/v2/thread.hpp>
+
+
+#endif

Modified: trunk/libs/thread/src/pthread/thread.cpp
==============================================================================
--- trunk/libs/thread/src/pthread/thread.cpp (original)
+++ trunk/libs/thread/src/pthread/thread.cpp 2013-02-06 01:40:30 EST (Wed, 06 Feb 2013)
@@ -8,7 +8,7 @@
 
 #include <boost/thread/detail/config.hpp>
 
-#include <boost/thread/thread.hpp>
+#include <boost/thread/thread_only.hpp>
 #if defined BOOST_THREAD_USES_DATETIME
 #include <boost/thread/xtime.hpp>
 #endif
@@ -435,7 +435,11 @@
               {
 
   # if defined(BOOST_HAS_PTHREAD_DELAY_NP)
+ # if defined(__IBMCPP__)
+ BOOST_VERIFY(!pthread_delay_np(const_cast<timespec*>(&ts)));
+ # else
                 BOOST_VERIFY(!pthread_delay_np(&ts));
+ # endif
   # elif defined(BOOST_HAS_NANOSLEEP)
                 // nanosleep takes a timespec that is an offset, not
                 // an absolute time.


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