Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r78802 - in trunk: boost/thread boost/thread/detail libs/thread/build libs/thread/doc libs/thread/example libs/thread/src/pthread libs/thread/src/win32 libs/thread/test libs/thread/test/sync/futures/async libs/thread/test/threads/this_thread/sleep_for libs/thread/test/threads/this_thread/sleep_until
From: vicente.botet_at_[hidden]
Date: 2012-06-03 14:11:56


Author: viboes
Date: 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
New Revision: 78802
URL: http://svn.boost.org/trac/boost/changeset/78802

Log:
Thread: fix TIME_UTC, WINVER, constexpr for tags, and don't use local files
Text files modified:
   trunk/boost/thread/detail/config.hpp | 2 +-
   trunk/boost/thread/detail/delete.hpp | 11 +++++++++++
   trunk/boost/thread/future.hpp | 34 ++++++++++++++++++++++++++++++++++
   trunk/boost/thread/locks.hpp | 6 +++---
   trunk/boost/thread/xtime.hpp | 12 ++++++------
   trunk/libs/thread/build/Jamfile.v2 | 12 ++++++------
   trunk/libs/thread/doc/changes.qbk | 12 +++++++++++-
   trunk/libs/thread/doc/emulations.qbk | 2 +-
   trunk/libs/thread/doc/mutex_concepts.qbk | 6 +++---
   trunk/libs/thread/example/starvephil.cpp | 6 +++---
   trunk/libs/thread/example/tennis.cpp | 4 ++--
   trunk/libs/thread/example/thread.cpp | 2 +-
   trunk/libs/thread/example/xtime.cpp | 2 +-
   trunk/libs/thread/src/pthread/thread.cpp | 6 +++---
   trunk/libs/thread/src/pthread/timeconv.inl | 16 ++++++++--------
   trunk/libs/thread/src/win32/thread.cpp | 5 +++++
   trunk/libs/thread/src/win32/timeconv.inl | 16 ++++++++--------
   trunk/libs/thread/test/sync/futures/async/async_pass.cpp | 12 +++++++-----
   trunk/libs/thread/test/test_condition_notify_all.cpp | 2 +-
   trunk/libs/thread/test/test_condition_notify_one.cpp | 2 +-
   trunk/libs/thread/test/test_condition_timed_wait_times_out.cpp | 2 +-
   trunk/libs/thread/test/test_futures.cpp | 8 ++++----
   trunk/libs/thread/test/test_ml.cpp | 10 +++++-----
   trunk/libs/thread/test/test_shared_mutex.cpp | 4 ++--
   trunk/libs/thread/test/test_shared_mutex_part_2.cpp | 4 ++--
   trunk/libs/thread/test/test_shared_mutex_timed_locks.cpp | 4 ++--
   trunk/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp | 4 ++--
   trunk/libs/thread/test/test_thread_exit.cpp | 8 ++++----
   trunk/libs/thread/test/test_xtime.cpp | 10 +++++-----
   trunk/libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp | 4 +++-
   trunk/libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp | 5 ++++-
   trunk/libs/thread/test/util.inl | 4 ++--
   32 files changed, 152 insertions(+), 85 deletions(-)

Modified: trunk/boost/thread/detail/config.hpp
==============================================================================
--- trunk/boost/thread/detail/config.hpp (original)
+++ trunk/boost/thread/detail/config.hpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -131,7 +131,7 @@
 # pragma warn -8066 // Unreachable code
 #endif
 
-#include "platform.hpp"
+#include <boost/thread/detail/platform.hpp>
 
 // provided for backwards compatibility, since this
 // macro was used for several releases by mistake.

Modified: trunk/boost/thread/detail/delete.hpp
==============================================================================
--- trunk/boost/thread/detail/delete.hpp (original)
+++ trunk/boost/thread/detail/delete.hpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -8,6 +8,13 @@
 
 #include <boost/config.hpp>
 
+/**
+ * BOOST_THREAD_DELETE_COPY_CTOR deletes the copy constructor when the compiler supports it or
+ * makes it private.
+ *
+ * BOOST_THREAD_DELETE_COPY_ASSIGN deletes the copy assignment when the compiler supports it or
+ * makes it private.
+ */
 #ifndef BOOST_NO_DELETED_FUNCTIONS
 #define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
       CLASS(CLASS const&) = delete; \
@@ -27,6 +34,10 @@
     public:
 #endif // BOOST_NO_DELETED_FUNCTIONS
 
+/**
+ * BOOST_THREAD_NO_COPYABLE deletes the copy constructor and assignment when the compiler supports it or
+ * makes them private.
+ */
 #define BOOST_THREAD_NO_COPYABLE(CLASS) \
     BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
     BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS)

Modified: trunk/boost/thread/future.hpp
==============================================================================
--- trunk/boost/thread/future.hpp (original)
+++ trunk/boost/thread/future.hpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -43,6 +43,9 @@
 #include <boost/thread/detail/memory.hpp>
 #endif
 
+#include <boost/utility/result_of.hpp>
+//#include <boost/thread.hpp>
+
 #if defined BOOST_THREAD_PROVIDES_FUTURE
 #define BOOST_THREAD_FUTURE future
 #else
@@ -1655,6 +1658,37 @@
 
     BOOST_THREAD_DCL_MOVABLE_BEG(T) packaged_task<T> BOOST_THREAD_DCL_MOVABLE_END
 
+// template <class F>
+// BOOST_THREAD_FUTURE<typename boost::result_of<F()>::type>
+// async(launch policy, F f)
+// {
+// typedef typename boost::result_of<F()>::type R;
+// typedef BOOST_THREAD_FUTURE<R> future;
+// if (int(policy) & int(launch::async))
+// {
+// packaged_task<R> pt( f );
+//
+// BOOST_THREAD_FUTURE ret = pt.get_future();
+// boost::thread( boost::move(pt) ).detach();
+// return ::boost::move(ret);
+// }
+// else if (int(policy) & int(launch::deferred))
+// {
+// packaged_task<R> pt( f );
+//
+// BOOST_THREAD_FUTURE ret = pt.get_future();
+// return ::boost::move(ret);
+// }
+// }
+//
+// template <class F>
+// BOOST_THREAD_FUTURE<typename boost::result_of<F()>::type>
+// async(F f)
+// {
+// return async(launch::any, f);
+// }
+
+
 
 }
 

Modified: trunk/boost/thread/locks.hpp
==============================================================================
--- trunk/boost/thread/locks.hpp (original)
+++ trunk/boost/thread/locks.hpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -170,9 +170,9 @@
     struct adopt_lock_t
     {};
 
- const defer_lock_t defer_lock={};
- const try_to_lock_t try_to_lock={};
- const adopt_lock_t adopt_lock={};
+ BOOST_CONSTEXPR_OR_CONST defer_lock_t defer_lock={};
+ BOOST_CONSTEXPR_OR_CONST try_to_lock_t try_to_lock={};
+ BOOST_CONSTEXPR_OR_CONST adopt_lock_t adopt_lock={};
 
     template<typename Mutex>
     class shared_lock;

Modified: trunk/boost/thread/xtime.hpp
==============================================================================
--- trunk/boost/thread/xtime.hpp (original)
+++ trunk/boost/thread/xtime.hpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -2,7 +2,7 @@
 // William E. Kempf
 // Copyright (C) 2007-8 Anthony Williams
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// 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)
 
 #ifndef BOOST_XTIME_WEK070601_HPP
@@ -20,7 +20,7 @@
 
 enum xtime_clock_types
 {
- TIME_UTC=1
+ TIME_UTC_=1
 // TIME_TAI,
 // TIME_MONOTONIC,
 // TIME_PROCESS,
@@ -53,14 +53,14 @@
         boost::posix_time::microseconds((nsec+500)/1000);
 #endif
     }
-
+
 };
 
 inline xtime get_xtime(boost::system_time const& abs_time)
 {
     xtime res;
     boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0);
-
+
     res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds());
     res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
     return res;
@@ -68,7 +68,7 @@
 
 inline int xtime_get(struct xtime* xtp, int clock_type)
 {
- if (clock_type == TIME_UTC)
+ if (clock_type == TIME_UTC_)
     {
         *xtp=get_xtime(get_system_time());
         return clock_type;
@@ -81,7 +81,7 @@
 {
     if (xt1.sec == xt2.sec)
         return (int)(xt1.nsec - xt2.nsec);
- else
+ else
         return (xt1.sec > xt2.sec) ? 1 : -1;
 }
 

Modified: trunk/libs/thread/build/Jamfile.v2
==============================================================================
--- trunk/libs/thread/build/Jamfile.v2 (original)
+++ trunk/libs/thread/build/Jamfile.v2 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -40,8 +40,8 @@
 project boost/thread
     : source-location ../src
     : requirements <threading>multi
- <link>static:<define>BOOST_THREAD_BUILD_LIB=1
- <link>shared:<define>BOOST_THREAD_BUILD_DLL=1
+ <link>static:<define>BOOST_THREAD_STATIC_LINK=1
+ <link>shared:<define>BOOST_THREAD_DYN_LINK=1
       -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
       <tag>@$(__name__).tag
       <toolset>gcc:<cxxflags>-Wno-long-long
@@ -92,8 +92,8 @@
 
     # : default-build <threading>multi
     : usage-requirements # pass these requirement to dependents (i.e. users)
- <link>static:<define>BOOST_THREAD_BUILD_LIB=1
- <link>shared:<define>BOOST_THREAD_BUILD_DLL=1
+ <link>static:<define>BOOST_THREAD_STATIC_LINK=1
+ <link>shared:<define>BOOST_THREAD_DYN_LINK=1
       <define>BOOST_SYSTEM_NO_DEPRECATED
       <library>/boost/system//boost_system
     ;
@@ -263,7 +263,7 @@
     : thread_sources future.cpp
     : <conditional>@requirements
     :
- : <link>shared:<define>BOOST_THREAD_USE_DLL=1
- <link>static:<define>BOOST_THREAD_USE_LIB=1
+ : #<link>shared:<define>BOOST_THREAD_USE_DLL=1
+ #<link>static:<define>BOOST_THREAD_USE_LIB=1
       <conditional>@usage-requirements
     ;

Modified: trunk/libs/thread/doc/changes.qbk
==============================================================================
--- trunk/libs/thread/doc/changes.qbk (original)
+++ trunk/libs/thread/doc/changes.qbk 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -20,25 +20,34 @@
 * [@http://svn.boost.org/trac/boost/ticket/6195 #6195] c++11 compliance: Provide the standard time related interface using Boost.Chrono.
 * [@http://svn.boost.org/trac/boost/ticket/6217 #6217] Enhance Boost.Thread shared mutex interface following Howard Hinnant proposal.
 * [@http://svn.boost.org/trac/boost/ticket/6224 #6224] c++11 compliance: Add the use of standard noexcept on compilers supporting them.
+* [@http://svn.boost.org/trac/boost/ticket/6225 #6225] Add the use of standard =delete defaulted operations on compilers supporting them.
 * [@http://svn.boost.org/trac/boost/ticket/6226 #6226] c++11 compliance: Add explicit bool conversion from locks.
 * [@http://svn.boost.org/trac/boost/ticket/6228 #6228] Add promise constructor with allocator following the standard c++11.
+* [@http://svn.boost.org/trac/boost/ticket/6229 #6229] Rename the unique_future to future following the c++11.
 * [@http://svn.boost.org/trac/boost/ticket/6230 #6230] c++11 compliance: Follows the exception reporting mechanism as defined in the c++11.
+* [@http://svn.boost.org/trac/boost/ticket/6231 #6231] Add BasicLockable requirements in the documentation to follow c++11.
 * [@http://svn.boost.org/trac/boost/ticket/6266 #6266] Breaking change: thread destructor should call terminate if joinable.
 * [@http://svn.boost.org/trac/boost/ticket/6269 #6269] Breaking change: thread move assignment should call terminate if joinable.
 * [@http://svn.boost.org/trac/boost/ticket/6272 #6272] c++11 compliance: Add thread::id hash specialization.
 * [@http://svn.boost.org/trac/boost/ticket/6273 #6273] c++11 compliance: Add cv_status enum class and use it on the conditions wait functions.
-* [@http://svn.boost.org/trac/boost/ticket/6231 #6231] Add BasicLockable requirements in the documentation to follow c++11.
 * [@http://svn.boost.org/trac/boost/ticket/6342 #6342] c++11 compliance: Adapt the one_flag to the c++11 interface.
 * [@http://svn.boost.org/trac/boost/ticket/6671 #6671] upgrade_lock: missing mutex and release functions.
 * [@http://svn.boost.org/trac/boost/ticket/6672 #6672] upgrade_lock:: missing constructors from time related types.
 * [@http://svn.boost.org/trac/boost/ticket/6675 #6675] upgrade_lock:: missing non-member swap.
+* [@http://svn.boost.org/trac/boost/ticket/6676 #6676] lock conversion should be explicit.
 * Added missing packaged_task::result_type and packaged_task:: constructor with allocator.
 * Added packaged_task::reset()
 
+
 Fixed Bugs:
 
+* [@http://svn.boost.org/trac/boost/ticket/2380 #2380] boost::move from lvalue does not work with gcc.
+* [@http://svn.boost.org/trac/boost/ticket/2430 #2430] shared_mutex for win32 doesn't have timed_lock_upgrade.
 * [@http://svn.boost.org/trac/boost/ticket/2575 #2575] Bug- Boost 1.36.0 on Itanium platform.
+* [@http://svn.boost.org/trac/boost/ticket/3160 #3160] Duplicate tutorial code in boost::thread.
 * [@http://svn.boost.org/trac/boost/ticket/4345 #4345] thread::id and joining problem with cascade of threads.
+* [@http://svn.boost.org/trac/boost/ticket/4521 #4521] Error using boost::move on packaged_task (MSVC 10).
+* [@http://svn.boost.org/trac/boost/ticket/4711 #4711] Must use implementation details to return move-only types.
 * [@http://svn.boost.org/trac/boost/ticket/4921 #4921] BOOST_THREAD_USE_DLL and BOOST_THREAD_USE_LIB are crucial and need to be documented.
 * [@http://svn.boost.org/trac/boost/ticket/5013 #5013] documentation: boost::thread: pthreas_exit causes terminate().
 * [@http://svn.boost.org/trac/boost/ticket/5173 #5173] boost::this_thread::get_id is very slow.
@@ -47,6 +56,7 @@
 * [@http://svn.boost.org/trac/boost/ticket/5990 #5990] shared_future<T>::get() has wrong return type.
 * [@http://svn.boost.org/trac/boost/ticket/6174 #6174] packaged_task doesn't correctly handle moving results.
 * [@http://svn.boost.org/trac/boost/ticket/6222 #6222] Compile error with SunStudio: unique_future move.
+* [@http://svn.boost.org/trac/boost/ticket/6354 #6354] PGI: Compiler threading support is not turned on.
 * [@http://svn.boost.org/trac/boost/ticket/6673 #6673] shared_lock: move assign doesn't works with c++11.
 * [@http://svn.boost.org/trac/boost/ticket/6674 #6674] shared_mutex: try_lock_upgrade_until doesn't works.
 * Fix issue signaled on the ML with task_object(task_object const&) in presence of task_object(task_object &&)

Modified: trunk/libs/thread/doc/emulations.qbk
==============================================================================
--- trunk/libs/thread/doc/emulations.qbk (original)
+++ trunk/libs/thread/doc/emulations.qbk 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -340,7 +340,7 @@
 
 use
 
- switch (BOOST_SCOPED_ENUM_NATIVE(future_errc)(ev))
+ switch (boost::native_value(ev))
         {
         case future_errc::broken_promise:
 

Modified: trunk/libs/thread/doc/mutex_concepts.qbk
==============================================================================
--- trunk/libs/thread/doc/mutex_concepts.qbk (original)
+++ trunk/libs/thread/doc/mutex_concepts.qbk 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -795,9 +795,9 @@
     struct defer_lock_t {};
     struct try_to_lock_t {};
     struct adopt_lock_t {};
- const defer_lock_t defer_lock;
- const try_to_lock_t try_to_lock;
- const adopt_lock_t adopt_lock;
+ constexpr defer_lock_t defer_lock;
+ constexpr try_to_lock_t try_to_lock;
+ constexpr adopt_lock_t adopt_lock;
  
     template<typename Lockable>
     class lock_guard

Modified: trunk/libs/thread/example/starvephil.cpp
==============================================================================
--- trunk/libs/thread/example/starvephil.cpp (original)
+++ trunk/libs/thread/example/starvephil.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -50,7 +50,7 @@
                       << "very hot ..." << std::endl;
         }
         boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
         xt.sec += 3;
         boost::thread::sleep(xt);
         m_chickens += value;
@@ -85,7 +85,7 @@
             std::cout << "(" << clock() << ") Chef: cooking ..." << std::endl;
         }
         boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
         xt.sec += 2;
         boost::thread::sleep(xt);
         {
@@ -111,7 +111,7 @@
             if (m_id > 0)
             {
                 boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
                 xt.sec += 3;
                 boost::thread::sleep(xt);
             }

Modified: trunk/libs/thread/example/tennis.cpp
==============================================================================
--- trunk/libs/thread/example/tennis.cpp (original)
+++ trunk/libs/thread/example/tennis.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -1,7 +1,7 @@
 // Copyright (C) 2001-2003
 // William E. Kempf
 //
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// 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/mutex.hpp>
@@ -104,7 +104,7 @@
     boost::thread thrdb(thread_adapter(&player, (void*)PLAYER_B));
 
     boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
     xt.sec += 1;
     boost::thread::sleep(xt);
     {

Modified: trunk/libs/thread/example/thread.cpp
==============================================================================
--- trunk/libs/thread/example/thread.cpp (original)
+++ trunk/libs/thread/example/thread.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -14,7 +14,7 @@
     void operator()()
     {
         boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
         xt.sec += m_secs;
 
         boost::thread::sleep(xt);

Modified: trunk/libs/thread/example/xtime.cpp
==============================================================================
--- trunk/libs/thread/example/xtime.cpp (original)
+++ trunk/libs/thread/example/xtime.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -10,7 +10,7 @@
 int main()
 {
     boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
     xt.sec += 1;
     boost::thread::sleep(xt); // Sleep for 1 second
 }

Modified: trunk/libs/thread/src/pthread/thread.cpp
==============================================================================
--- trunk/libs/thread/src/pthread/thread.cpp (original)
+++ trunk/libs/thread/src/pthread/thread.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -24,7 +24,7 @@
 #include <unistd.h>
 #endif
 
-#include "timeconv.inl"
+#include <libs/thread/src/pthread/timeconv.inl>
 
 namespace boost
 {
@@ -416,7 +416,7 @@
                     cond.timed_wait(lock, xt);
 # endif
                     xtime cur;
- xtime_get(&cur, TIME_UTC);
+ xtime_get(&cur, TIME_UTC_);
                     if (xtime_cmp(xt, cur) <= 0)
                         return;
                 }
@@ -458,7 +458,7 @@
             BOOST_VERIFY(!pthread_yield());
 # else
             xtime xt;
- xtime_get(&xt, TIME_UTC);
+ xtime_get(&xt, TIME_UTC_);
             sleep(xt);
 # endif
         }

Modified: trunk/libs/thread/src/pthread/timeconv.inl
==============================================================================
--- trunk/libs/thread/src/pthread/timeconv.inl (original)
+++ trunk/libs/thread/src/pthread/timeconv.inl 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -20,8 +20,8 @@
 inline void to_time(int milliseconds, boost::xtime& xt)
 {
     int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&xt, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
 
     xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
     xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -56,8 +56,8 @@
 {
     boost::xtime cur;
     int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
 
     if (boost::xtime_cmp(xt, cur) <= 0)
     {
@@ -87,8 +87,8 @@
 {
     boost::xtime cur;
     int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
 
     if (boost::xtime_cmp(xt, cur) <= 0)
         milliseconds = 0;
@@ -109,8 +109,8 @@
 {
     boost::xtime cur;
     int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
 
     if (boost::xtime_cmp(xt, cur) <= 0)
         microseconds = 0;

Modified: trunk/libs/thread/src/win32/thread.cpp
==============================================================================
--- trunk/libs/thread/src/win32/thread.cpp (original)
+++ trunk/libs/thread/src/win32/thread.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -4,8 +4,13 @@
 // (C) Copyright 2007 Anthony Williams
 // (C) Copyright 2007 David Deakins
 
+#ifndef _WIN32_WINNT
 #define _WIN32_WINNT 0x400
+#endif
+
+#ifndef WINVER
 #define WINVER 0x400
+#endif
 
 #include <boost/thread/thread.hpp>
 #include <algorithm>

Modified: trunk/libs/thread/src/win32/timeconv.inl
==============================================================================
--- trunk/libs/thread/src/win32/timeconv.inl (original)
+++ trunk/libs/thread/src/win32/timeconv.inl 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -17,8 +17,8 @@
 inline void to_time(int milliseconds, boost::xtime& xt)
 {
     int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&xt, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
 
     xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
     xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -54,8 +54,8 @@
 {
     boost::xtime cur;
     int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
 
     if (boost::xtime_cmp(xt, cur) <= 0)
     {
@@ -85,8 +85,8 @@
 {
     boost::xtime cur;
     int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
 
     if (boost::xtime_cmp(xt, cur) <= 0)
         milliseconds = 0;
@@ -107,8 +107,8 @@
 {
     boost::xtime cur;
     int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
 
     if (boost::xtime_cmp(xt, cur) <= 0)
         microseconds = 0;

Modified: trunk/libs/thread/test/sync/futures/async/async_pass.cpp
==============================================================================
--- trunk/libs/thread/test/sync/futures/async/async_pass.cpp (original)
+++ trunk/libs/thread/test/sync/futures/async/async_pass.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -24,6 +24,8 @@
 
 
 #include <boost/thread/future.hpp>
+#include <boost/thread/thread.hpp>
+#include <boost/interprocess/smart_ptr/unique_ptr.hpp>
 #include <memory>
 #include <boost/detail/lightweight_test.hpp>
 
@@ -49,13 +51,13 @@
   boost::this_thread::sleep_for(ms(200));
 }
 
-boost::unique_ptr<int> f3(int i)
+boost::interprocess::unique_ptr<int> f3(int i)
 {
   boost::this_thread::sleep_for(ms(200));
- return boost::unique_ptr<int>(new int(i));
+ return boost::interprocess::unique_ptr<int>(new int(i));
 }
 
-boost::unique_ptr<int> f4(boost::unique_ptr<int>&& p)
+boost::interprocess::unique_ptr<int> f4(boost::interprocess::unique_ptr<int>&& p)
 {
   boost::this_thread::sleep_for(ms(200));
   return boost::move(p);
@@ -163,7 +165,7 @@
   }
 
   {
- boost::future<boost::unique_ptr<int>> f = boost::async(f3, 3);
+ boost::future<boost::interprocess::unique_ptr<int>> f = boost::async(f3, 3);
     boost::this_thread::sleep_for(ms(300));
     Clock::time_point t0 = Clock::now();
     BOOST_TEST(*f.get() == 3);
@@ -172,7 +174,7 @@
   }
 
   {
- boost::future<boost::unique_ptr<int>> f = boost::async(f4, boost::unique_ptr<int>(new int(3)));
+ boost::future<boost::interprocess::unique_ptr<int>> f = boost::async(f4, boost::interprocess::unique_ptr<int>(new int(3)));
     boost::this_thread::sleep_for(ms(300));
     Clock::time_point t0 = Clock::now();
     BOOST_TEST(*f.get() == 3);

Modified: trunk/libs/thread/test/test_condition_notify_all.cpp
==============================================================================
--- trunk/libs/thread/test/test_condition_notify_all.cpp (original)
+++ trunk/libs/thread/test/test_condition_notify_all.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -10,7 +10,7 @@
 #include <boost/test/unit_test.hpp>
 
 #include <libs/thread/test/util.inl>
-#include "condition_test_common.hpp"
+#include <libs/thread/test/condition_test_common.hpp>
 
 unsigned const number_of_test_threads=5;
 

Modified: trunk/libs/thread/test/test_condition_notify_one.cpp
==============================================================================
--- trunk/libs/thread/test/test_condition_notify_one.cpp (original)
+++ trunk/libs/thread/test/test_condition_notify_one.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -10,7 +10,7 @@
 #include <boost/test/unit_test.hpp>
 
 #include <libs/thread/test/util.inl>
-#include "condition_test_common.hpp"
+#include <libs/thread/test/condition_test_common.hpp>
 
 void do_test_condition_notify_one_wakes_from_wait()
 {

Modified: trunk/libs/thread/test/test_condition_timed_wait_times_out.cpp
==============================================================================
--- trunk/libs/thread/test/test_condition_timed_wait_times_out.cpp (original)
+++ trunk/libs/thread/test/test_condition_timed_wait_times_out.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -9,7 +9,7 @@
 #include <boost/thread/thread.hpp>
 
 #include <boost/test/unit_test.hpp>
-#include "util.inl"
+#include <libs/thread/test/util.inl>
 
 bool fake_predicate()
 {

Modified: trunk/libs/thread/test/test_futures.cpp
==============================================================================
--- trunk/libs/thread/test/test_futures.cpp (original)
+++ trunk/libs/thread/test/test_futures.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -4,10 +4,10 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include "boost/thread/thread.hpp"
-#include "boost/thread/mutex.hpp"
-#include "boost/thread/condition.hpp"
-#include "boost/thread/future.hpp"
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/condition.hpp>
+#include <boost/thread/future.hpp>
 #include <utility>
 #include <memory>
 #include <string>

Modified: trunk/libs/thread/test/test_ml.cpp
==============================================================================
--- trunk/libs/thread/test/test_ml.cpp (original)
+++ trunk/libs/thread/test/test_ml.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -2,8 +2,8 @@
 #ifndef BOOST_NO_RVALUE_REFERENCES
 
 #include <boost/detail/lightweight_test.hpp>
-#include "boost/thread/future.hpp"
-#include "boost/utility/result_of.hpp"
+#include <boost/thread/future.hpp>
+#include <boost/utility/result_of.hpp>
 #include <functional>
 
 struct async_func {
@@ -116,9 +116,9 @@
 
 /*
  *
- * #include "boost/test/unit_test.hpp"
-#include "boost/thread/future.hpp"
-#include "boost/utility/result_of.hpp"
+ * #include <boost/test/unit_test.hpp>
+#include <boost/thread/future.hpp>
+#include <boost/utility/result_of.hpp>
 #include <functional>
 
 struct async_func {

Modified: trunk/libs/thread/test/test_shared_mutex.cpp
==============================================================================
--- trunk/libs/thread/test/test_shared_mutex.cpp (original)
+++ trunk/libs/thread/test/test_shared_mutex.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -6,8 +6,8 @@
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
-#include "util.inl"
-#include "shared_mutex_locking_thread.hpp"
+#include <libs/thread/test/util.inl>
+#include <libs/thread/test/shared_mutex_locking_thread.hpp>
 
 #define CHECK_LOCKED_VALUE_EQUAL(mutex_name,value,expected_value) \
     { \

Modified: trunk/libs/thread/test/test_shared_mutex_part_2.cpp
==============================================================================
--- trunk/libs/thread/test/test_shared_mutex_part_2.cpp (original)
+++ trunk/libs/thread/test/test_shared_mutex_part_2.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -6,8 +6,8 @@
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
-#include "util.inl"
-#include "shared_mutex_locking_thread.hpp"
+#include <libs/thread/test/util.inl>
+#include <libs/thread/test/shared_mutex_locking_thread.hpp>
 
 #define CHECK_LOCKED_VALUE_EQUAL(mutex_name,value,expected_value) \
     { \

Modified: trunk/libs/thread/test/test_shared_mutex_timed_locks.cpp
==============================================================================
--- trunk/libs/thread/test/test_shared_mutex_timed_locks.cpp (original)
+++ trunk/libs/thread/test/test_shared_mutex_timed_locks.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -6,8 +6,8 @@
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/xtime.hpp>
-#include "util.inl"
-#include "shared_mutex_locking_thread.hpp"
+#include <libs/thread/test/util.inl>
+#include <libs/thread/test/shared_mutex_locking_thread.hpp>
 
 #define CHECK_LOCKED_VALUE_EQUAL(mutex_name,value,expected_value) \
     { \

Modified: trunk/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp
==============================================================================
--- trunk/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp (original)
+++ trunk/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -6,8 +6,8 @@
 #include <boost/test/unit_test.hpp>
 #include <boost/thread/thread.hpp>
 #include <boost/thread/shared_mutex.hpp>
-#include "util.inl"
-#include "shared_mutex_locking_thread.hpp"
+#include <libs/thread/test/util.inl>
+#include <libs/thread/test/shared_mutex_locking_thread.hpp>
 
 #if defined BOOST_THREAD_USES_CHRONO
 

Modified: trunk/libs/thread/test/test_thread_exit.cpp
==============================================================================
--- trunk/libs/thread/test/test_thread_exit.cpp (original)
+++ trunk/libs/thread/test/test_thread_exit.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -4,10 +4,10 @@
 // accompanying file LICENSE_1_0.txt or copy at
 // http://www.boost.org/LICENSE_1_0.txt)
 
-#include "boost/thread/thread.hpp"
-#include "boost/thread/mutex.hpp"
-#include "boost/thread/condition.hpp"
-#include "boost/thread/future.hpp"
+#include <boost/thread/thread.hpp>
+#include <boost/thread/mutex.hpp>
+#include <boost/thread/condition.hpp>
+#include <boost/thread/future.hpp>
 #include <utility>
 #include <memory>
 #include <string>

Modified: trunk/libs/thread/test/test_xtime.cpp
==============================================================================
--- trunk/libs/thread/test/test_xtime.cpp (original)
+++ trunk/libs/thread/test/test_xtime.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -17,8 +17,8 @@
 {
     boost::xtime xt1, xt2, cur;
     BOOST_CHECK_EQUAL(
- boost::xtime_get(&cur, boost::TIME_UTC),
- static_cast<int>(boost::TIME_UTC));
+ boost::xtime_get(&cur, boost::TIME_UTC_),
+ static_cast<int>(boost::TIME_UTC_));
 
     xt1 = xt2 = cur;
     xt1.nsec -= 1;
@@ -42,14 +42,14 @@
     boost::xtime orig, cur, old;
     BOOST_CHECK_EQUAL(
         boost::xtime_get(&orig,
- boost::TIME_UTC), static_cast<int>(boost::TIME_UTC));
+ boost::TIME_UTC_), static_cast<int>(boost::TIME_UTC_));
     old = orig;
 
     for (int x=0; x < 100; ++x)
     {
         BOOST_CHECK_EQUAL(
- boost::xtime_get(&cur, boost::TIME_UTC),
- static_cast<int>(boost::TIME_UTC));
+ boost::xtime_get(&cur, boost::TIME_UTC_),
+ static_cast<int>(boost::TIME_UTC_));
         BOOST_CHECK(boost::xtime_cmp(cur, orig) >= 0);
         BOOST_CHECK(boost::xtime_cmp(cur, old) >= 0);
         old = cur;

Modified: trunk/libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp (original)
+++ trunk/libs/thread/test/threads/this_thread/sleep_for/sleep_for_pass.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -17,6 +17,7 @@
 
 #include <boost/thread/thread.hpp>
 #include <cstdlib>
+#include <algorithm>
 
 #include <boost/detail/lightweight_test.hpp>
 
@@ -35,7 +36,8 @@
   boost::chrono::nanoseconds err = ms / 100;
   // The time slept is within 1% of 500ms
   // This test is spurious as it depends on the time the thread system switches the threads
- BOOST_TEST(std::abs(static_cast<long>(ns.count())) < (err+boost::chrono::milliseconds(1000)).count());
+ BOOST_TEST(std::max(ns.count(), -ns.count()) < (err+boost::chrono::milliseconds(1000)).count());
+ //BOOST_TEST(std::abs(static_cast<long>(ns.count())) < (err+boost::chrono::milliseconds(1000)).count());
   return boost::report_errors();
 
 }

Modified: trunk/libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp
==============================================================================
--- trunk/libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp (original)
+++ trunk/libs/thread/test/threads/this_thread/sleep_until/sleep_until_pass.cpp 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -17,6 +17,7 @@
 
 #include <boost/thread/thread.hpp>
 #include <cstdlib>
+#include <algorithm>
 
 #include <boost/detail/lightweight_test.hpp>
 
@@ -35,7 +36,9 @@
   boost::chrono::nanoseconds err = ms / 100;
   // The time slept is within 1% of 500ms
   // This test is spurious as it depends on the time the thread system switches the threads
- BOOST_TEST(std::abs(static_cast<long>(ns.count())) < (err+boost::chrono::milliseconds(1000)).count());
+ BOOST_TEST(std::max(ns.count(), -ns.count()) < (err+boost::chrono::milliseconds(1000)).count());
+ //BOOST_TEST(std::abs(static_cast<long>(ns.count())) < (err+boost::chrono::milliseconds(1000)).count());
+ return boost::report_errors();
 
 }
 

Modified: trunk/libs/thread/test/util.inl
==============================================================================
--- trunk/libs/thread/test/util.inl (original)
+++ trunk/libs/thread/test/util.inl 2012-06-03 14:11:52 EDT (Sun, 03 Jun 2012)
@@ -30,8 +30,8 @@
     const int NANOSECONDS_PER_MILLISECOND = 1000000;
 
     boost::xtime xt;
- if (boost::TIME_UTC != boost::xtime_get (&xt, boost::TIME_UTC))
- BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC");
+ if (boost::TIME_UTC_ != boost::xtime_get (&xt, boost::TIME_UTC_))
+ BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC_");
 
     nsecs += xt.nsec;
     msecs += nsecs / NANOSECONDS_PER_MILLISECOND;


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