|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r80450 - in branches/release: boost/thread boost/thread/detail boost/thread/pthread boost/thread/win32 libs/thread libs/thread/build libs/thread/doc libs/thread/src libs/thread/src/pthread libs/thread/src/win32 libs/thread/test libs/thread/test/sync/conditions/condition_variable libs/thread/test/sync/conditions/condition_variable_any libs/thread/test/sync/futures/async libs/thread/test/sync/futures/future libs/thread/test/sync/futures/packaged_task libs/thread/test/sync/futures/promise libs/thread/test/sync/mutual_exclusion/locks/lock_guard libs/thread/test/sync/mutual_exclusion/locks/reverse_lock libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons libs/thread/test/sync/mutual_exclusion/locks/unique_lock/obs libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons libs/thread/test/sync/mutual_exclusion/mutex libs/thread/test/sync/mutual_exclusion/recursive_mutex libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex libs/thread/test/sync/mutual_exclusion/shared_mutex libs/thread/test/sync/mutual_exclusion/timed_mutex libs/thread/test/threads/thread/assign libs/thread/test/threads/thread/constr libs/thread/test/threads/thread/members
From: vicente.botet_at_[hidden]
Date: 2012-09-08 10:59:35
Author: viboes
Date: 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
New Revision: 80450
URL: http://svn.boost.org/trac/boost/changeset/80450
Log:
Thread: merge from trunk: 1.52
Added:
branches/release/libs/thread/test/remove_error_code_unused_warning.hpp
- copied unchanged from r80349, /trunk/libs/thread/test/remove_error_code_unused_warning.hpp
branches/release/libs/thread/test/test_3628.cpp
- copied unchanged from r80349, /trunk/libs/thread/test/test_3628.cpp
branches/release/libs/thread/test/test_3837.cpp
- copied unchanged from r80349, /trunk/libs/thread/test/test_3837.cpp
branches/release/libs/thread/test/test_7160.cpp
- copied unchanged from r80349, /trunk/libs/thread/test/test_7160.cpp
branches/release/libs/thread/test/test_7328.cpp
- copied unchanged from r80349, /trunk/libs/thread/test/test_7328.cpp
Properties modified:
branches/release/boost/thread/ (props changed)
branches/release/libs/thread/ (props changed)
Text files modified:
branches/release/boost/thread/detail/config.hpp | 2
branches/release/boost/thread/detail/delete.hpp | 6 +-
branches/release/boost/thread/detail/memory.hpp | 103 +++++++++++++++++++++++++++++++++++
branches/release/boost/thread/detail/move.hpp | 8 +-
branches/release/boost/thread/detail/thread.hpp | 20 ++++--
branches/release/boost/thread/future.hpp | 100 ++++++++++++++++++----------------
branches/release/boost/thread/locks.hpp | 12 ++--
branches/release/boost/thread/pthread/once.hpp | 29 +++++++--
branches/release/boost/thread/pthread/thread_data.hpp | 38 ++++++++++++
branches/release/boost/thread/pthread/thread_heap_alloc.hpp | 8 +-
branches/release/boost/thread/win32/thread_data.hpp | 17 ++++-
branches/release/boost/thread/win32/thread_heap_alloc.hpp | 2
branches/release/boost/thread/win32/thread_primitives.hpp | 12 +--
branches/release/libs/thread/build/Jamfile.v2 | 5 -
branches/release/libs/thread/doc/changes.qbk | 30 ++++++++++
branches/release/libs/thread/doc/compliance.qbk | 32 +++++-----
branches/release/libs/thread/doc/configuration.qbk | 7 +
branches/release/libs/thread/doc/future_ref.qbk | 4
branches/release/libs/thread/doc/overview.qbk | 2
branches/release/libs/thread/doc/shared_mutex_ref.qbk | 1
branches/release/libs/thread/doc/thread.qbk | 2
branches/release/libs/thread/doc/thread_ref.qbk | 6 +-
branches/release/libs/thread/doc/tss.qbk | 8 ++
branches/release/libs/thread/src/future.cpp | 2
branches/release/libs/thread/src/pthread/once.cpp | 10 +-
branches/release/libs/thread/src/pthread/thread.cpp | 29 ---------
branches/release/libs/thread/src/tss_null.cpp | 4
branches/release/libs/thread/src/win32/thread.cpp | 114 +++++++++++++++++----------------------
branches/release/libs/thread/test/Jamfile.v2 | 25 +++----
branches/release/libs/thread/test/no_implicit_assign_from_lvalue_thread.cpp | 12 ---
branches/release/libs/thread/test/no_implicit_move_from_lvalue_thread.cpp | 12 ---
branches/release/libs/thread/test/sync/conditions/condition_variable/assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/conditions/condition_variable/copy_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/conditions/condition_variable_any/assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/conditions/condition_variable_any/copy_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/futures/async/async_pass.cpp | 103 ++++++++++++++++++-----------------
branches/release/libs/thread/test/sync/futures/future/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/futures/future/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/futures/future/dtor_pass.cpp | 2
branches/release/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp | 2
branches/release/libs/thread/test/sync/futures/packaged_task/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/futures/packaged_task/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/futures/packaged_task/use_allocator_pass.cpp | 2
branches/release/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp | 2
branches/release/libs/thread/test/sync/futures/promise/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/futures/promise/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/futures/promise/move_assign_pass.cpp | 2
branches/release/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp | 2
branches/release/libs/thread/test/sync/futures/promise/use_allocator_pass.cpp | 2
branches/release/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/obs/op_int_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/copy_assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/copy_ctor_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/mutex/assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/mutex/copy_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/recursive_mutex/assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/recursive_mutex/copy_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/assign_fail.cpp | 11 ---
branches/release/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/copy_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/shared_mutex/assign_fail.cpp | 10 ---
branches/release/libs/thread/test/sync/mutual_exclusion/shared_mutex/copy_fail.cpp | 11 ---
branches/release/libs/thread/test/sync/mutual_exclusion/timed_mutex/assign_fail.cpp | 11 ---
branches/release/libs/thread/test/sync/mutual_exclusion/timed_mutex/copy_fail.cpp | 11 ---
branches/release/libs/thread/test/test_2309.cpp | 72 ++++++++++++------------
branches/release/libs/thread/test/test_2501.cpp | 5 +
branches/release/libs/thread/test/test_2741.cpp | 2
branches/release/libs/thread/test/test_4521.cpp | 5 +
branches/release/libs/thread/test/test_4648.cpp | 5 +
branches/release/libs/thread/test/test_4882.cpp | 5 +
branches/release/libs/thread/test/test_5351.cpp | 5 +
branches/release/libs/thread/test/test_5502.cpp | 5 +
branches/release/libs/thread/test/test_5542_1.cpp | 5 +
branches/release/libs/thread/test/test_5542_2.cpp | 5 +
branches/release/libs/thread/test/test_5542_3.cpp | 5 +
branches/release/libs/thread/test/test_6130.cpp | 9 +++
branches/release/libs/thread/test/test_6170.cpp | 5 +
branches/release/libs/thread/test/test_condition.cpp | 2
branches/release/libs/thread/test/test_condition_notify_all.cpp | 4
branches/release/libs/thread/test/test_condition_notify_one.cpp | 4
branches/release/libs/thread/test/test_condition_timed_wait_times_out.cpp | 2
branches/release/libs/thread/test/test_ml.cpp | 5 +
branches/release/libs/thread/test/test_mutex.cpp | 2
branches/release/libs/thread/test/test_shared_mutex.cpp | 4
branches/release/libs/thread/test/test_shared_mutex_part_2.cpp | 4
branches/release/libs/thread/test/test_shared_mutex_timed_locks.cpp | 4
branches/release/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp | 4
branches/release/libs/thread/test/test_thread.cpp | 2
branches/release/libs/thread/test/test_tss.cpp | 14 ++++
branches/release/libs/thread/test/threads/thread/assign/copy_fail.cpp | 12 ---
branches/release/libs/thread/test/threads/thread/constr/copy_fail.cpp | 11 ---
branches/release/libs/thread/test/threads/thread/members/join_pass.cpp | 48 ++++++++++-----
100 files changed, 660 insertions(+), 708 deletions(-)
Modified: branches/release/boost/thread/detail/config.hpp
==============================================================================
--- branches/release/boost/thread/detail/config.hpp (original)
+++ branches/release/boost/thread/detail/config.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -13,8 +13,10 @@
// This compiler doesn't support Boost.Chrono
#if defined __IBMCPP__ && (__IBMCPP__ < 1100)
+#if ! defined BOOST_THREAD_DONT_USE_CHRONO
#define BOOST_THREAD_DONT_USE_CHRONO
#endif
+#endif
// This compiler doesn't support Boost.Move
#if BOOST_WORKAROUND(__SUNPRO_CC, < 0x5100)
Modified: branches/release/boost/thread/detail/delete.hpp
==============================================================================
--- branches/release/boost/thread/detail/delete.hpp (original)
+++ branches/release/boost/thread/detail/delete.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -15,14 +15,14 @@
* BOOST_THREAD_DELETE_COPY_ASSIGN deletes the copy assignment when the compiler supports it or
* makes it private.
*/
-#ifndef BOOST_NO_DELETED_FUNCTIONS
+#ifndef BOOST_NO_CXX11_DELETED_FUNCTIONS
#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
CLASS(CLASS const&) = delete; \
#define BOOST_THREAD_DELETE_COPY_ASSIGN(CLASS) \
CLASS& operator=(CLASS const&) = delete;
-#else // BOOST_NO_DELETED_FUNCTIONS
+#else // BOOST_NO_CXX11_DELETED_FUNCTIONS
#define BOOST_THREAD_DELETE_COPY_CTOR(CLASS) \
private: \
CLASS(CLASS&); \
@@ -32,7 +32,7 @@
private: \
CLASS& operator=(CLASS&); \
public:
-#endif // BOOST_NO_DELETED_FUNCTIONS
+#endif // BOOST_NO_CXX11_DELETED_FUNCTIONS
/**
* BOOST_THREAD_NO_COPYABLE deletes the copy constructor and assignment when the compiler supports it or
Modified: branches/release/boost/thread/detail/memory.hpp
==============================================================================
--- branches/release/boost/thread/detail/memory.hpp (original)
+++ branches/release/boost/thread/detail/memory.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -11,9 +11,15 @@
#ifndef BOOST_THREAD_DETAIL_MEMORY_HPP
#define BOOST_THREAD_DETAIL_MEMORY_HPP
+#include <boost/config.hpp>
#include <boost/container/allocator_traits.hpp>
#include <boost/container/scoped_allocator.hpp>
-#include <boost/config.hpp>
+#include <boost/type_traits/remove_cv.hpp>
+#include <boost/type_traits/is_convertible.hpp>
+#include <boost/type_traits/is_scalar.hpp>
+#include <boost/type_traits/is_pointer.hpp>
+#include <boost/type_traits/is_same.hpp>
+#include <boost/static_assert.hpp>
namespace boost
{
@@ -48,6 +54,101 @@
{
};
+ template <class Ptr>
+ struct pointer_traits
+ {
+ typedef Ptr pointer;
+// typedef <details> element_type;
+// typedef <details> difference_type;
+
+// template <class U> using rebind = <details>;
+//
+// static pointer pointer_to(<details>);
+ };
+
+ template <class T>
+ struct pointer_traits<T*>
+ {
+ typedef T* pointer;
+ typedef T element_type;
+ typedef ptrdiff_t difference_type;
+
+// template <class U> using rebind = U*;
+//
+// static pointer pointer_to(<details>) noexcept;
+ };
+
+
+ namespace thread_detail {
+ template <class _Ptr1, class _Ptr2,
+ bool = is_same<typename remove_cv<typename pointer_traits<_Ptr1>::element_type>::type,
+ typename remove_cv<typename pointer_traits<_Ptr2>::element_type>::type
+ >::value
+ >
+ struct same_or_less_cv_qualified_imp
+ : is_convertible<_Ptr1, _Ptr2> {};
+
+ template <class _Ptr1, class _Ptr2>
+ struct same_or_less_cv_qualified_imp<_Ptr1, _Ptr2, false>
+ : false_type {};
+
+ template <class _Ptr1, class _Ptr2, bool = is_scalar<_Ptr1>::value &&
+ !is_pointer<_Ptr1>::value>
+ struct same_or_less_cv_qualified
+ : same_or_less_cv_qualified_imp<_Ptr1, _Ptr2> {};
+
+ template <class _Ptr1, class _Ptr2>
+ struct same_or_less_cv_qualified<_Ptr1, _Ptr2, true>
+ : false_type {};
+
+ }
+ template <class T>
+ struct BOOST_SYMBOL_VISIBLE default_delete
+ {
+ #ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+ BOOST_SYMBOL_VISIBLE
+ BOOST_CONSTEXPR default_delete() = default;
+ #else
+ BOOST_SYMBOL_VISIBLE
+ BOOST_CONSTEXPR default_delete() BOOST_NOEXCEPT {}
+ #endif
+ template <class U>
+ BOOST_SYMBOL_VISIBLE
+ default_delete(const default_delete<U>&,
+ typename enable_if<is_convertible<U*, T*> >::type* = 0) BOOST_NOEXCEPT {}
+ BOOST_SYMBOL_VISIBLE
+ void operator() (T* ptr) const BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT_MSG(sizeof(T) > 0, "default_delete can not delete incomplete type");
+ delete ptr;
+ }
+ };
+
+ template <class T>
+ struct BOOST_SYMBOL_VISIBLE default_delete<T[]>
+ {
+ public:
+ #ifndef BOOST_NO_CXX11_DEFAULTED_FUNCTIONS
+ BOOST_SYMBOL_VISIBLE
+ BOOST_CONSTEXPR default_delete() = default;
+ #else
+ BOOST_SYMBOL_VISIBLE
+ BOOST_CONSTEXPR default_delete() BOOST_NOEXCEPT {}
+ #endif
+ template <class U>
+ BOOST_SYMBOL_VISIBLE
+ default_delete(const default_delete<U[]>&,
+ typename enable_if<thread_detail::same_or_less_cv_qualified<U*, T*> >::type* = 0) BOOST_NOEXCEPT {}
+ template <class U>
+ BOOST_SYMBOL_VISIBLE
+ void operator() (U* ptr,
+ typename enable_if<thread_detail::same_or_less_cv_qualified<U*, T*> >::type* = 0) const BOOST_NOEXCEPT
+ {
+ BOOST_STATIC_ASSERT_MSG(sizeof(T) > 0, "default_delete can not delete incomplete type");
+ delete [] ptr;
+ }
+ };
+
} // namespace boost
Modified: branches/release/boost/thread/detail/move.hpp
==============================================================================
--- branches/release/boost/thread/detail/move.hpp (original)
+++ branches/release/boost/thread/detail/move.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -65,7 +65,7 @@
}
}
-#if ! defined BOOST_NO_RVALUE_REFERENCES
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
#define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG
@@ -84,7 +84,7 @@
{}; \
}
-#elif ! defined BOOST_NO_RVALUE_REFERENCES && defined BOOST_MSVC
+#elif ! defined BOOST_NO_CXX11_RVALUE_REFERENCES && defined BOOST_MSVC
#define BOOST_THREAD_RV_REF(TYPE) BOOST_RV_REF(TYPE)
#define BOOST_THREAD_RV_REF_BEG BOOST_RV_REF_BEG
@@ -176,7 +176,7 @@
#endif
-#if ! defined BOOST_NO_RVALUE_REFERENCES
+#if ! defined BOOST_NO_CXX11_RVALUE_REFERENCES
#define BOOST_THREAD_MOVABLE(TYPE)
@@ -227,7 +227,7 @@
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
namespace boost
{ namespace thread_detail
{
Modified: branches/release/boost/thread/detail/thread.hpp
==============================================================================
--- branches/release/boost/thread/detail/thread.hpp (original)
+++ branches/release/boost/thread/detail/thread.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -52,7 +52,7 @@
{
public:
BOOST_THREAD_NO_COPYABLE(thread_data)
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
thread_data(BOOST_THREAD_RV_REF(F) f_):
f(boost::forward<F>(f_))
{}
@@ -131,7 +131,7 @@
detail::thread_data_ptr get_thread_info BOOST_PREVENT_MACRO_SUBSTITUTION () const;
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<typename F>
static inline detail::thread_data_ptr make_thread_info(BOOST_THREAD_RV_REF(F) f)
{
@@ -174,7 +174,7 @@
detach();
#endif
}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <
class F
>
@@ -364,11 +364,17 @@
#endif
#if defined(BOOST_THREAD_PLATFORM_WIN32)
bool timed_join(const system_time& abs_time);
-
+ private:
+ bool do_try_join_until(uintmax_t milli);
+ public:
#ifdef BOOST_THREAD_USES_CHRONO
- bool try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp);
+ bool try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
+ {
+ chrono::milliseconds rel_time= chrono::ceil<chrono::milliseconds>(tp-chrono::system_clock::now());
+ return do_try_join_until(rel_time.count());
+ }
#endif
- public:
+
#else
bool timed_join(const system_time& abs_time)
@@ -434,7 +440,7 @@
return lhs.swap(rhs);
}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
inline thread&& move(thread& t) BOOST_NOEXCEPT
{
return static_cast<thread&&>(t);
Modified: branches/release/boost/thread/future.hpp
==============================================================================
--- branches/release/boost/thread/future.hpp (original)
+++ branches/release/boost/thread/future.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -50,7 +50,7 @@
#endif
#include <boost/utility/result_of.hpp>
-//#include <boost/thread.hpp>
+#include <boost/thread/thread.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE
#define BOOST_THREAD_FUTURE future
@@ -77,7 +77,7 @@
template <>
struct BOOST_SYMBOL_VISIBLE is_error_code_enum<future_errc> : public true_type {};
- #ifdef BOOST_NO_SCOPED_ENUMS
+ #ifdef BOOST_NO_CXX11_SCOPED_ENUMS
template <>
struct BOOST_SYMBOL_VISIBLE is_error_code_enum<future_errc::enum_type> : public true_type { };
#endif
@@ -102,20 +102,20 @@
BOOST_SCOPED_ENUM_DECLARE_END(future_status)
BOOST_THREAD_DECL
- const system::error_category& future_category();
+ const system::error_category& future_category() BOOST_NOEXCEPT;
namespace system
{
- inline BOOST_THREAD_DECL
+ inline
error_code
- make_error_code(future_errc e)
+ make_error_code(future_errc e) //BOOST_NOEXCEPT
{
return error_code(underlying_cast<int>(e), boost::future_category());
}
- inline BOOST_THREAD_DECL
+ inline
error_condition
- make_error_condition(future_errc e)
+ make_error_condition(future_errc e) //BOOST_NOEXCEPT
{
return error_condition(underlying_cast<int>(e), future_category());
}
@@ -137,14 +137,13 @@
return ec_;
}
- //virtual ~future_error() BOOST_NOEXCEPT;
};
class BOOST_SYMBOL_VISIBLE future_uninitialized:
public future_error
{
public:
- future_uninitialized():
+ future_uninitialized() :
future_error(system::make_error_code(future_errc::no_state))
{}
};
@@ -179,7 +178,6 @@
public:
task_already_started():
future_error(system::make_error_code(future_errc::promise_already_satisfied))
- //std::logic_error("Task already started")
{}
};
@@ -189,7 +187,6 @@
public:
task_moved():
future_error(system::make_error_code(future_errc::no_state))
- //std::logic_error("Task moved")
{}
};
@@ -199,7 +196,6 @@
public:
promise_moved():
future_error(system::make_error_code(future_errc::no_state))
- //std::logic_error("Promise moved")
{}
};
@@ -374,7 +370,7 @@
struct future_traits
{
typedef boost::scoped_ptr<T> storage_type;
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
typedef T const& source_reference_type;
struct dummy;
typedef typename boost::mpl::if_<boost::is_fundamental<T>,dummy&,BOOST_THREAD_RV_REF(T)>::type rvalue_source_type;
@@ -576,7 +572,7 @@
class future_waiter
{
struct registered_waiter;
- typedef std::vector<registered_waiter>::size_type count_type;
+ typedef std::vector<int>::size_type count_type;
struct registered_waiter
{
@@ -1219,6 +1215,11 @@
future_->mark_exceptional_finish_internal(p);
}
+ // setting the result with deferred notification
+ //void set_value_at_thread_exit(const R& r); // NOT YET IMPLEMENTED
+ //void set_value_at_thread_exit(see below); // NOT YET IMPLEMENTED
+ //void set_exception_at_thread_exit(exception_ptr p); // NOT YET IMPLEMENTED
+
template<typename F>
void set_wait_callback(F f)
{
@@ -1422,7 +1423,7 @@
task_object(F const& f_):
f(f_)
{}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
task_object(BOOST_THREAD_RV_REF(F) f_):
f(boost::forward<F>(f_))
{}
@@ -1459,7 +1460,7 @@
task_object(F const& f_):
f(f_)
{}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
task_object(BOOST_THREAD_RV_REF(F) f_):
f(boost::forward<F>(f_))
{}
@@ -1509,7 +1510,7 @@
explicit packaged_task(R(*f)()):
task(new detail::task_object<R,R(*)()>(f)),future_obtained(false)
{}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class F>
explicit packaged_task(BOOST_THREAD_RV_REF(F) f):
task(new detail::task_object<R,
@@ -1539,7 +1540,7 @@
task = task_ptr(::new(a2.allocate(1)) detail::task_object<R,FR>(f), D(a2, 1) );
future_obtained = false;
}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template <class F, class Allocator>
packaged_task(boost::allocator_arg_t, Allocator a, BOOST_THREAD_RV_REF(F) f)
{
@@ -1572,7 +1573,7 @@
task = task_ptr(::new(a2.allocate(1)) detail::task_object<R,F>(boost::move(f)), D(a2, 1) );
future_obtained = false;
}
-#endif //BOOST_NO_RVALUE_REFERENCES
+#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
#endif // BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
~packaged_task()
@@ -1665,35 +1666,38 @@
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);
-// }
+ 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<R> 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<R> ret = pt.get_future();
+ return ::boost::move(ret);
+ } else {
+ BOOST_THREAD_FUTURE<R> ret;
+ 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: branches/release/boost/thread/locks.hpp
==============================================================================
--- branches/release/boost/thread/locks.hpp (original)
+++ branches/release/boost/thread/locks.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -609,7 +609,7 @@
is_locked=false;
}
-#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
typedef void (unique_lock::*bool_type)();
operator bool_type() const BOOST_NOEXCEPT
{
@@ -880,7 +880,7 @@
is_locked=false;
}
-#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
typedef void (shared_lock<Mutex>::*bool_type)();
operator bool_type() const BOOST_NOEXCEPT
{
@@ -1140,7 +1140,7 @@
return is_locked;
}
#endif
-#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
typedef void (upgrade_lock::*bool_type)();
operator bool_type() const BOOST_NOEXCEPT
{
@@ -1224,7 +1224,7 @@
exclusive.swap(other.exclusive);
}
-#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
typedef void (upgrade_to_unique_lock::*bool_type)(upgrade_to_unique_lock&);
operator bool_type() const BOOST_NOEXCEPT
{
@@ -1275,7 +1275,7 @@
try_lock_wrapper(Mutex& m_,try_to_lock_t):
base(m_,try_to_lock)
{}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
try_lock_wrapper(BOOST_THREAD_RV_REF(try_lock_wrapper) other):
base(::boost::move(other))
{}
@@ -1325,7 +1325,7 @@
return base::release();
}
-#if defined(BOOST_NO_EXPLICIT_CONVERSION_OPERATORS)
+#if defined(BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS)
typedef typename base::bool_type bool_type;
operator bool_type() const
{
Modified: branches/release/boost/thread/pthread/once.hpp
==============================================================================
--- branches/release/boost/thread/pthread/once.hpp (original)
+++ branches/release/boost/thread/pthread/once.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -17,6 +17,7 @@
#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
#include <boost/cstdint.hpp>
#include <boost/thread/detail/delete.hpp>
+#include <csignal>
#include <boost/config/abi_prefix.hpp>
@@ -25,6 +26,18 @@
#define BOOST_ONCE_INITIAL_FLAG_VALUE 0
+ namespace thread_detail
+ {
+#ifdef SIG_ATOMIC_MAX
+ typedef sig_atomic_t uintmax_atomic_t;
+ #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C SIG_ATOMIC_MAX
+#else
+ typedef unsigned long uintmax_atomic_t;
+ #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(value) value##ul
+ #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(~0)
+#endif
+ }
+
#ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11
struct once_flag
@@ -34,7 +47,7 @@
: epoch(BOOST_ONCE_INITIAL_FLAG_VALUE)
{}
private:
- boost::uintmax_t epoch;
+ volatile thread_detail::uintmax_atomic_t epoch;
template<typename Function>
friend
void call_once(once_flag& flag,Function f);
@@ -44,7 +57,7 @@
struct once_flag
{
- boost::uintmax_t epoch;
+ volatile thread_detail::uintmax_atomic_t epoch;
};
#define BOOST_ONCE_INIT {BOOST_ONCE_INITIAL_FLAG_VALUE}
@@ -52,8 +65,8 @@
namespace detail
{
- BOOST_THREAD_DECL boost::uintmax_t& get_once_per_thread_epoch();
- BOOST_THREAD_DECL extern boost::uintmax_t once_global_epoch;
+ BOOST_THREAD_DECL thread_detail::uintmax_atomic_t& get_once_per_thread_epoch();
+ BOOST_THREAD_DECL extern thread_detail::uintmax_atomic_t once_global_epoch;
BOOST_THREAD_DECL extern pthread_mutex_t once_epoch_mutex;
BOOST_THREAD_DECL extern pthread_cond_t once_epoch_cv;
}
@@ -63,10 +76,10 @@
template<typename Function>
void call_once(once_flag& flag,Function f)
{
- static boost::uintmax_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
- static boost::uintmax_t const being_initialized=uninitialized_flag+1;
- boost::uintmax_t const epoch=flag.epoch;
- boost::uintmax_t& this_thread_epoch=detail::get_once_per_thread_epoch();
+ static thread_detail::uintmax_atomic_t const uninitialized_flag=BOOST_ONCE_INITIAL_FLAG_VALUE;
+ static thread_detail::uintmax_atomic_t const being_initialized=uninitialized_flag+1;
+ thread_detail::uintmax_atomic_t const epoch=flag.epoch;
+ thread_detail::uintmax_atomic_t& this_thread_epoch=detail::get_once_per_thread_epoch();
if(epoch<this_thread_epoch)
{
Modified: branches/release/boost/thread/pthread/thread_data.hpp
==============================================================================
--- branches/release/boost/thread/pthread/thread_data.hpp (original)
+++ branches/release/boost/thread/pthread/thread_data.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -177,7 +177,43 @@
namespace this_thread
{
#ifdef BOOST_THREAD_USES_CHRONO
- void BOOST_SYMBOL_VISIBLE sleep_for(const chrono::nanoseconds& ns);
+ inline
+ void BOOST_SYMBOL_VISIBLE sleep_for(const chrono::nanoseconds& ns)
+ {
+ using namespace chrono;
+ boost::detail::thread_data_base* const thread_info=boost::detail::get_current_thread_data();
+
+ if(thread_info)
+ {
+ unique_lock<mutex> lk(thread_info->sleep_mutex);
+ while(cv_status::no_timeout==thread_info->sleep_condition.wait_for(lk,ns)) {}
+ }
+ else
+ {
+ if (ns >= nanoseconds::zero())
+ {
+
+ # if defined(BOOST_HAS_PTHREAD_DELAY_NP)
+ timespec ts;
+ ts.tv_sec = static_cast<long>(duration_cast<seconds>(ns).count());
+ ts.tv_nsec = static_cast<long>((ns - seconds(ts.tv_sec)).count());
+ BOOST_VERIFY(!pthread_delay_np(&ts));
+ # elif defined(BOOST_HAS_NANOSLEEP)
+ timespec ts;
+ ts.tv_sec = static_cast<long>(duration_cast<seconds>(ns).count());
+ ts.tv_nsec = static_cast<long>((ns - seconds(ts.tv_sec)).count());
+ // nanosleep takes a timespec that is an offset, not
+ // an absolute time.
+ nanosleep(&ts, 0);
+ # else
+ mutex mx;
+ mutex::scoped_lock lock(mx);
+ condition_variable cond;
+ cond.wait_for(lock, ns);
+ # endif
+ }
+ }
+ }
#endif
void BOOST_THREAD_DECL yield() BOOST_NOEXCEPT;
Modified: branches/release/boost/thread/pthread/thread_heap_alloc.hpp
==============================================================================
--- branches/release/boost/thread/pthread/thread_heap_alloc.hpp (original)
+++ branches/release/boost/thread/pthread/thread_heap_alloc.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -17,7 +17,7 @@
return new T();
}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<typename T,typename A1>
inline T* heap_new(A1&& a1)
{
@@ -72,7 +72,7 @@
{
return heap_new_impl<T,A1&>(a1);
}
-
+
template<typename T,typename A1,typename A2>
inline T* heap_new(A1 const& a1,A2 const& a2)
{
@@ -218,8 +218,8 @@
{
return heap_new_impl<T,A1&,A2&,A3&,A4&>(a1,a2,a3,a4);
}
-
-#endif
+
+#endif
template<typename T>
inline void heap_delete(T* data)
{
Modified: branches/release/boost/thread/win32/thread_data.hpp
==============================================================================
--- branches/release/boost/thread/win32/thread_data.hpp (original)
+++ branches/release/boost/thread/win32/thread_data.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -11,6 +11,7 @@
#include <boost/thread/thread_time.hpp>
#include <boost/thread/win32/thread_primitives.hpp>
#include <boost/thread/win32/thread_heap_alloc.hpp>
+#include <map>
#ifdef BOOST_THREAD_USES_CHRONO
#include <boost/chrono/system_clocks.hpp>
#endif
@@ -58,8 +59,18 @@
namespace detail
{
+ struct tss_cleanup_function;
struct thread_exit_callback_node;
- struct tss_data_node;
+ struct tss_data_node
+ {
+ boost::shared_ptr<boost::detail::tss_cleanup_function> func;
+ void* value;
+
+ tss_data_node(boost::shared_ptr<boost::detail::tss_cleanup_function> func_,
+ void* value_):
+ func(func_),value(value_)
+ {}
+ };
struct thread_data_base;
void intrusive_ptr_add_ref(thread_data_base * p);
@@ -71,14 +82,14 @@
detail::win32::handle_manager thread_handle;
detail::win32::handle_manager interruption_handle;
boost::detail::thread_exit_callback_node* thread_exit_callbacks;
- boost::detail::tss_data_node* tss_data;
+ std::map<void const*,boost::detail::tss_data_node> tss_data;
bool interruption_enabled;
unsigned id;
thread_data_base():
count(0),thread_handle(detail::win32::invalid_handle_value),
interruption_handle(create_anonymous_event(detail::win32::manual_reset_event,detail::win32::event_initially_reset)),
- thread_exit_callbacks(0),tss_data(0),
+ thread_exit_callbacks(0),tss_data(),
interruption_enabled(true),
id(0)
{}
Modified: branches/release/boost/thread/win32/thread_heap_alloc.hpp
==============================================================================
--- branches/release/boost/thread/win32/thread_heap_alloc.hpp (original)
+++ branches/release/boost/thread/win32/thread_heap_alloc.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -91,7 +91,7 @@
#endif
}
-#ifndef BOOST_NO_RVALUE_REFERENCES
+#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
template<typename T,typename A1>
inline T* heap_new(A1&& a1)
{
Modified: branches/release/boost/thread/win32/thread_primitives.hpp
==============================================================================
--- branches/release/boost/thread/win32/thread_primitives.hpp (original)
+++ branches/release/boost/thread/win32/thread_primitives.hpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -10,7 +10,7 @@
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
-#include <boost/config.hpp>
+#include <boost/thread/detail/config.hpp>
#include <boost/throw_exception.hpp>
#include <boost/assert.hpp>
#include <boost/thread/exceptions.hpp>
@@ -341,7 +341,7 @@
{
inline bool interlocked_bit_test_and_set(long* x,long bit)
{
-#if 0
+#ifndef BOOST_INTEL_CXX_VERSION
__asm {
mov eax,bit;
mov edx,x;
@@ -349,7 +349,7 @@
setc al;
};
#else
- bool ret;
+ bool ret=false;
__asm {
mov eax,bit; mov edx,x; lock bts [edx],eax; setc al; mov ret, al
};
@@ -360,7 +360,7 @@
inline bool interlocked_bit_test_and_reset(long* x,long bit)
{
-#if 0
+#ifndef BOOST_INTEL_CXX_VERSION
__asm {
mov eax,bit;
mov edx,x;
@@ -368,9 +368,7 @@
setc al;
};
#else
-
-
- bool ret;
+ bool ret=false;
__asm {
mov eax,bit; mov edx,x; lock btr [edx],eax; setc al; mov ret, al
};
Modified: branches/release/libs/thread/build/Jamfile.v2
==============================================================================
--- branches/release/libs/thread/build/Jamfile.v2 (original)
+++ branches/release/libs/thread/build/Jamfile.v2 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -236,10 +236,7 @@
}
}
}
- if ! <toolset>vacpp in $(properties) || <toolset-vacpp:version>11.1 in $(properties)
- {
- result += <library>/boost/chrono//boost_chrono ;
- }
+ result += <define>BOOST_THREAD_DONT_USE_CHRONO ;
return $(result) ;
}
Modified: branches/release/libs/thread/doc/changes.qbk
==============================================================================
--- branches/release/libs/thread/doc/changes.qbk (original)
+++ branches/release/libs/thread/doc/changes.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -8,8 +8,34 @@
[section:changes History]
+[heading Version 3.1.0 - boost 1.52]
+
+New Features:
+
+* [@http://svn.boost.org/trac/boost/ticket/2361 #2361] thread_specific_ptr: document nature of the key, complexity and rationale
+* [@http://svn.boost.org/trac/boost/ticket/4710 #4710] C++11 compliance: : Missing async()
+
+Fixed Bugs:
+
+* [@http://svn.boost.org/trac/boost/ticket/2797 #2797] Two problems with thread_specific_ptr
+* [@http://svn.boost.org/trac/boost/ticket/5274 #5274] failed to compile future.hpp with stlport 5.1.5 under msvc8.1, because of undefined class
+* [@http://svn.boost.org/trac/boost/ticket/5431 #5431] compile error in Windows CE 6.0(interlocked)
+* [@http://svn.boost.org/trac/boost/ticket/5752 #5752] boost::call_once() is unreliable on some platforms
+* [@http://svn.boost.org/trac/boost/ticket/5696 #5696] win32 detail::set_tss_data does nothing when tss_cleanup_function is NULL
+* [@http://svn.boost.org/trac/boost/ticket/7045 #7045] Thread library does not automatically compile date_time
+* [@http://svn.boost.org/trac/boost/ticket/7173 #7173] wrong function name interrupt_point()
+* [@http://svn.boost.org/trac/boost/ticket/7200 #7200] Unable to build boost.thread modularized
+* [@http://svn.boost.org/trac/boost/ticket/7220 #7220 7238 gcc 4.6.2 warns about inline+dllimport functions
+* [@http://svn.boost.org/trac/boost/ticket/7238 #5274] this_thread::sleep_for() does not respond to interrupt()
+* [@http://svn.boost.org/trac/boost/ticket/7245 #7245] Minor typos on documentation related to version 3
+* [@http://svn.boost.org/trac/boost/ticket/7272 #7272] win32/thread_primitives.hpp: (Unneccessary) Warning
+
[heading Version 3.0.1 - boost 1.51]
+New Features:
+
+* [@http://svn.boost.org/trac/boost/ticket/2100 #2100] thread fails to compile with -fno-exceptions
+
Deprecated features since boost 1.50 available only until boost 1.55:
These deprecated features will be provided by default up to boost 1.52. If you don't want to include the deprecated features you could define BOOST_THREAD_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0. Since 1.53 these features will not be included any more by default. Since this version, if you want to include the deprecated features yet you could define BOOST_THREAD_PROVIDE_DEPRECATED_FEATURES_SINCE_V3_0_0. These deprecated features will be only available until boost 1.55, that is you have 1 year and a half to move to the new features.
@@ -38,6 +64,10 @@
* [@http://svn.boost.org/trac/boost/ticket/7078 #7078] Trivial 64-bit warning fix on Windows for thread attribute stack size
* [@http://svn.boost.org/trac/boost/ticket/7089 #7089] BOOST_THREAD_WAIT_BUG limits functionality without solving anything
+[/
+#6787 boost::thread::sleep() hangs if system time is rolled back
+#7045 Thread library does not automatically compile date_time
+]
[heading Version 3.0.0 - boost 1.50]
Modified: branches/release/libs/thread/doc/compliance.qbk
==============================================================================
--- branches/release/libs/thread/doc/compliance.qbk (original)
+++ branches/release/libs/thread/doc/compliance.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -26,11 +26,11 @@
[[30.2.5.4] [TimedLockable requirements] [Yes] [-] [-]]
[[30.2.6] [decay_copy] [-] [-] [-]]
[[30.3] [Threads] [Partial] [-] [-]]
- [[30.3.1] [Class thread] [Partial] [move,variadic,terminate] [#zzzz,#6270,#6269]]
+ [[30.3.1] [Class thread] [Partial] [move,variadic,terminate] [#6270]]
[[30.3.1.1] [Class thread::id] [Yes] [-] [-]]
- [[30.3.1.2] [thread constructors] [Partial] [move,variadic] [#zzzz,#6270]]
- [[30.3.1.3] [thread destructor] [Partial] [terminate] [#6266]]
- [[30.3.1.4] [thread assignment] [Partial] [terminate] [#6269]]
+ [[30.3.1.2] [thread constructors] [Partial] [move,variadic] [#6270]]
+ [[30.3.1.3] [thread destructor] [Yes] [-] [-]]
+ [[30.3.1.4] [thread assignment] [Yes] [-] [-]]
[[30.3.1.5] [thread members] [Yes] [-] [-]]
[[30.3.1.6] [thread static members] [Yes] [-] [-]]
[[30.3.1.7] [thread specialized algorithms] [Yes] [-] [-]]
@@ -53,23 +53,23 @@
[[30.4.2.2.3] [unique_lock modifiers] [Yes] [-] [-]]
[[30.4.2.2.4] [unique_lock observers] [Yes] [] [-]]
[[30.4.3] [Generic locking algorithms] [Partial] [variadic] [#6227]]
- [[30.4.4] [Call once] [Partial] [The interface doesn't corresponds] [#6342]]
- [[30.4.4.1] [Struct once_flag] [Partial] [interface] [#6342]]
- [[30.4.4.2] [Function call_once] [Partial] [interface] [#6342]]
- [[30.5] [Condition variables] [Partial] [notify_all_at_thread_exit] [#xxxx]]
- [[30.5 6-10] [Function notify_all_at_thread_exit] [No] [-] [#xxxx]]
+ [[30.4.4] [Call once] [Partial] [call_once] [#7285]]
+ [[30.4.4.1] [Struct once_flag] [Yes] [-] [-]]
+ [[30.4.4.2] [Function call_once] [Partial] [interface] [#7285]]
+ [[30.5] [Condition variables] [Partial] [notify_all_at_thread_exit] [#7283]]
+ [[30.5 6-10] [Function notify_all_at_thread_exit] [No] [-] [#7283]]
[[30.5.1] [Class condition_variable] [Yes] [-] [-]]
[[30.5.2] [Class condition_variable_any] [Yes] [-] [-]]
- [[30.6] [Futures] [Partial] [-] [-]]
+ [[30.6] [Futures] [Partial] [async,at_thread_exit] [#4710,#7280]]
[[30.6.1] [Overview] [Partial] [-] [-]]
[[30.6.2] [Error handling] [Yes] [-] [-]]
- [[30.6.3] [Class future_error] [Yes] [-] [-]]
+ [[30.6.3] [Class future_error] [Partial] [noexcept] [#7279]]
[[30.6.4] [Shared state] [-] [-] [-]]
- [[30.6.5] [Class template promise] [Partial] [allocator] [#6228]]
- [[30.6.6] [Class template future] [Partial] [allocator,unique_future is the closest to future, renamed in V3] [#6228]]
- [[30.6.7] [Class template shared_future] [Partial] [allocator] [#6228]]
- [[30.6.8] [Function template async] [No] [async] [#4710]]
- [[30.6.9] [Class template packaged_task] [Partial] [move] [#yyyy]]
+ [[30.6.5] [Class template promise] [Partial] [at_thread_exit] [#7280]]
+ [[30.6.6] [Class template future] [Yes] [-] [-]]
+ [[30.6.7] [Class template shared_future] [Yes] [-] [-]]
+ [[30.6.8] [Function template async] [Partial] [deferred not implemented and only a copyable functor is allowed yet] [#4710]]
+ [[30.6.9] [Class template packaged_task] [Partial] [args,make_ready_at_thread_exit] [#7281,#7282]]
]
[/
Modified: branches/release/libs/thread/doc/configuration.qbk
==============================================================================
--- branches/release/libs/thread/doc/configuration.qbk (original)
+++ branches/release/libs/thread/doc/configuration.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -44,7 +44,7 @@
[section:shared_upwards Shared Locking Upwards Conversion]
-Boost.Threads includes in version 2 the Shared Locking Upwards Conversion as defined in [@http://home.roadrunner.com/~hinnant/bloomington/shared_mutex.html Shared Locking].
+Boost.Threads includes in version 3 the Shared Locking Upwards Conversion as defined in [@http://home.roadrunner.com/~hinnant/bloomington/shared_mutex.html Shared Locking].
These conversions need to be used carefully to avoid deadlock or livelock. The user need to define explicitly `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION` to get these upwards conversions.
When `BOOST_THREAD_VERSION==2` define `BOOST_THREAD_PROVIDES_SHARED_MUTEX_UPWARDS_CONVERSION ` if you want these features.
@@ -201,13 +201,16 @@
If __SUNPRO_CC < 0x5100 the library defines
* `BOOST_THREAD_DONT_USE_MOVE`
+
+If __SUNPRO_CC < 0x5100 the library defines
+
* `BOOST_THREAD_DONT_PROVIDE_FUTURE_CTOR_ALLOCATORS`
[endsect]
[section:vacpp VACPP]
-If __IBMCPP__ is defined the library defines
+If __IBMCPP__ < 1100 the library defines
* `BOOST_THREAD_DONT_USE_CHRONO`
Modified: branches/release/libs/thread/doc/future_ref.qbk
==============================================================================
--- branches/release/libs/thread/doc/future_ref.qbk (original)
+++ branches/release/libs/thread/doc/future_ref.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -61,8 +61,8 @@
class packaged_task;
template <class R> void swap(packaged_task<R>&, packaged_task<R>&) noexcept;
- //template <class R, class Alloc>
- //struct uses_allocator<packaged_task <R>, Alloc>; // NOT YET IMPLEMENTED
+ template <class R, class Alloc>
+ struct uses_allocator<packaged_task <R>, Alloc>;
// template <class F, class... Args>
// future<typename result_of<typename decay<F>::type(typename decay<Args>::type...)>::type>
Modified: branches/release/libs/thread/doc/overview.qbk
==============================================================================
--- branches/release/libs/thread/doc/overview.qbk (original)
+++ branches/release/libs/thread/doc/overview.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -20,7 +20,7 @@
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2139.html N2139], and
[@http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2094.html N2094]
-Vicente J. Botet Escriba started in version 2 the adaptation to comply with the accepted Thread C++11 library (Make use of Boost.Chrono and Boost.Move) and the [@http://home.roadrunner.com/~hinnant/bloomington/shared_mutex.html Shared Locking] Howard Hinnant proposal except for the upward conversions.
+Vicente J. Botet Escriba started in version 3 the adaptation to comply with the accepted Thread C++11 library (Make use of Boost.Chrono and Boost.Move) and the [@http://home.roadrunner.com/~hinnant/bloomington/shared_mutex.html Shared Locking] Howard Hinnant proposal except for the upward conversions.
Some minor features have been added also as thread attributes, reverse_lock, shared_lock_guard.
In order to use the classes and functions described here, you can
Modified: branches/release/libs/thread/doc/shared_mutex_ref.qbk
==============================================================================
--- branches/release/libs/thread/doc/shared_mutex_ref.qbk (original)
+++ branches/release/libs/thread/doc/shared_mutex_ref.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -58,6 +58,7 @@
Multiple concurrent calls to __lock_ref__, __try_lock_ref__, `__try_lock_for()`, `__try_lock_until()`, __timed_lock_ref__, __lock_shared_ref__,
`__try_lock_shared_for()`, `__try_lock_shared_until()`, __try_lock_shared_ref__ and __timed_lock_shared_ref__ are permitted.
+Note the the lack of reader-writer priority policies in shared_mutex. This is due to an algorithm credited to Alexander Terekhov which lets the OS decide which thread is the next to get the lock without caring whether a unique lock or shared lock is being sought. This results in a complete lack of reader or writer starvation. It is simply fair.
[endsect]
Modified: branches/release/libs/thread/doc/thread.qbk
==============================================================================
--- branches/release/libs/thread/doc/thread.qbk (original)
+++ branches/release/libs/thread/doc/thread.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -8,7 +8,7 @@
[library Thread
[quickbook 1.5]
- [version 3.0.1]
+ [version 3.1.0]
[authors [Williams, Anthony] [Botet Escriba, Vicente J.]]
[copyright 2007-11 Anthony Williams]
[copyright 2011-12 Vicente J. Botet Escriba]
Modified: branches/release/libs/thread/doc/thread_ref.qbk
==============================================================================
--- branches/release/libs/thread/doc/thread_ref.qbk (original)
+++ branches/release/libs/thread/doc/thread_ref.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -338,7 +338,7 @@
Of course all the synchronization facilities provided by Boost.Thread are also available on native threads.
-The `boost::this_thread` interrupt related functions behave in a degraded mode when called from a thread created using the native interface, i.e. `boost::this_thread::interruption_enabled()` returns false. As consequence the use of `boost::this_thread::disable_interruption` and `boost::this_thread::restore_interruption` will do nothing and calls to `boost::this_thread::interrupt_point()` will be just ignored.
+The `boost::this_thread` interrupt related functions behave in a degraded mode when called from a thread created using the native interface, i.e. `boost::this_thread::interruption_enabled()` returns false. As consequence the use of `boost::this_thread::disable_interruption` and `boost::this_thread::restore_interruption` will do nothing and calls to `boost::this_thread::interruption_point()` will be just ignored.
As the single way to interrupt a thread is through a __thread__ instance, `interruption_request()` wiil returns false for the native threads.
@@ -470,8 +470,8 @@
[variablelist
[[Effects:] [Transfers ownership of the thread managed by `other` (if
-any) to `*this`. Version 1: If there was a thread previously associated with
-`*this` then that thread is detached, version 2: If the thread is joinable calls to std::terminate.]]
+any) to `*this`. Version 2: If there was a thread previously associated with
+`*this` then that thread is detached, version 3: If the thread is joinable calls to std::terminate.]]
[[Postconditions:] [`other->get_id()==thread::id()` and `get_id()` returns the value of `other.get_id()` prior to the assignment.]]
Modified: branches/release/libs/thread/doc/tss.qbk
==============================================================================
--- branches/release/libs/thread/doc/tss.qbk (original)
+++ branches/release/libs/thread/doc/tss.qbk 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -47,6 +47,10 @@
`boost::thread` unless `boost::on_thread_exit()` is called manually
from that thread.
+[heading Rational about the nature of the key]
+
+Boost.Thread uses the address of the `thread_specific_ptr` instance as key of the thread specific pointers. This avoids to create/destroy a key which will need a lock to protect from race conditions. This has a little performance liability, as the access must be done using an associative container.
+
[section:thread_specific_ptr Class `thread_specific_ptr`]
#include <boost/thread/tss.hpp>
@@ -102,10 +106,14 @@
[variablelist
+[[Requires:] [All the thread specific instances associated to this thread_specific_ptr (except maybe the one associated to this thread) must be null.]]
+
[[Effects:] [Calls `this->reset()` to clean up the associated value for the current thread, and destroys `*this`.]]
[[Throws:] [Nothing.]]
+[[Remarks:] [The requirement is due to the fact that in order to delete all these instances, the implementation should be forced to maintain a list of all the threads having an associated specific ptr, which is against the goal of thread specific data.]]
+
]
[note Care needs to be taken to ensure that any threads still running after an instance of `boost::thread_specific_ptr` has been
Modified: branches/release/libs/thread/src/future.cpp
==============================================================================
--- branches/release/libs/thread/src/future.cpp (original)
+++ branches/release/libs/thread/src/future.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -51,7 +51,7 @@
}
const system::error_category&
- future_category()
+ future_category() BOOST_NOEXCEPT
{
static thread_detail::future_error_category f;
return f;
Modified: branches/release/libs/thread/src/pthread/once.cpp
==============================================================================
--- branches/release/libs/thread/src/pthread/once.cpp (original)
+++ branches/release/libs/thread/src/pthread/once.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -14,7 +14,7 @@
{
namespace detail
{
- BOOST_THREAD_DECL boost::uintmax_t once_global_epoch=UINTMAX_C(~0);
+ BOOST_THREAD_DECL thread_detail::uintmax_atomic_t once_global_epoch=BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C;
BOOST_THREAD_DECL pthread_mutex_t once_epoch_mutex=PTHREAD_MUTEX_INITIALIZER;
BOOST_THREAD_DECL pthread_cond_t once_epoch_cv = PTHREAD_COND_INITIALIZER;
@@ -55,17 +55,17 @@
#endif
}
- boost::uintmax_t& get_once_per_thread_epoch()
+ thread_detail::uintmax_atomic_t& get_once_per_thread_epoch()
{
BOOST_VERIFY(!pthread_once(&epoch_tss_key_flag,create_epoch_tss_key));
void* data=pthread_getspecific(epoch_tss_key);
if(!data)
{
- data=malloc(sizeof(boost::uintmax_t));
+ data=malloc(sizeof(thread_detail::uintmax_atomic_t));
BOOST_VERIFY(!pthread_setspecific(epoch_tss_key,data));
- *static_cast<boost::uintmax_t*>(data)=UINTMAX_C(~0);
+ *static_cast<thread_detail::uintmax_atomic_t*>(data)=BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C;
}
- return *static_cast<boost::uintmax_t*>(data);
+ return *static_cast<thread_detail::uintmax_atomic_t*>(data);
}
}
Modified: branches/release/libs/thread/src/pthread/thread.cpp
==============================================================================
--- branches/release/libs/thread/src/pthread/thread.cpp (original)
+++ branches/release/libs/thread/src/pthread/thread.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -24,7 +24,7 @@
#include <unistd.h>
#endif
-#include <libs/thread/src/pthread/timeconv.inl>
+#include "./timeconv.inl"
namespace boost
{
@@ -427,33 +427,6 @@
}
}
-#ifdef BOOST_THREAD_USES_CHRONO
- void
- sleep_for(const chrono::nanoseconds& ns)
- {
- using namespace chrono;
- if (ns >= nanoseconds::zero())
- {
- timespec ts;
- ts.tv_sec = static_cast<long>(duration_cast<seconds>(ns).count());
- ts.tv_nsec = static_cast<long>((ns - seconds(ts.tv_sec)).count());
-
-# if defined(BOOST_HAS_PTHREAD_DELAY_NP)
- BOOST_VERIFY(!pthread_delay_np(&ts));
-# elif defined(BOOST_HAS_NANOSLEEP)
- // nanosleep takes a timespec that is an offset, not
- // an absolute time.
- nanosleep(&ts, 0);
-# else
- mutex mx;
- mutex::scoped_lock lock(mx);
- condition_variable cond;
- cond.wait_for(lock, ns);
-# endif
- }
- }
-#endif
-
void yield() BOOST_NOEXCEPT
{
# if defined(BOOST_HAS_SCHED_YIELD)
Modified: branches/release/libs/thread/src/tss_null.cpp
==============================================================================
--- branches/release/libs/thread/src/tss_null.cpp (original)
+++ branches/release/libs/thread/src/tss_null.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -8,7 +8,7 @@
#if defined(BOOST_HAS_WINTHREADS) && (defined(BOOST_THREAD_BUILD_LIB) || defined(BOOST_THREAD_TEST) || defined(UNDER_CE)) && (!defined(_MSC_VER) || defined(UNDER_CE))
-namespace boost
+namespace boost
{
/*
This file is a "null" implementation of tss cleanup; it's
@@ -32,7 +32,7 @@
longer needed and can be removed.
*/
}
-
+
}
#endif //defined(BOOST_HAS_WINTHREADS) && defined(BOOST_THREAD_BUILD_LIB) && !defined(_MSC_VER)
Modified: branches/release/libs/thread/src/win32/thread.cpp
==============================================================================
--- branches/release/libs/thread/src/win32/thread.cpp (original)
+++ branches/release/libs/thread/src/win32/thread.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -128,19 +128,6 @@
{}
};
- struct tss_data_node
- {
- void const* key;
- boost::shared_ptr<boost::detail::tss_cleanup_function> func;
- void* value;
- tss_data_node* next;
-
- tss_data_node(void const* key_,boost::shared_ptr<boost::detail::tss_cleanup_function> func_,void* value_,
- tss_data_node* next_):
- key(key_),func(func_),value(value_),next(next_)
- {}
- };
-
}
namespace
@@ -150,7 +137,7 @@
detail::thread_data_ptr current_thread_data(get_current_thread_data(),false);
if(current_thread_data)
{
- while(current_thread_data->tss_data || current_thread_data->thread_exit_callbacks)
+ while(! current_thread_data->tss_data.empty() || current_thread_data->thread_exit_callbacks)
{
while(current_thread_data->thread_exit_callbacks)
{
@@ -163,15 +150,18 @@
}
boost::detail::heap_delete(current_node);
}
- while(current_thread_data->tss_data)
+ for(std::map<void const*,detail::tss_data_node>::iterator next=current_thread_data->tss_data.begin(),
+ current,
+ end=current_thread_data->tss_data.end();
+ next!=end;)
{
- detail::tss_data_node* const current_node=current_thread_data->tss_data;
- current_thread_data->tss_data=current_node->next;
- if(current_node->func)
+ current=next;
+ ++next;
+ if(current->second.func && (current->second.value!=0))
{
- (*current_node->func)(current_node->value);
+ (*current->second.func)(current->second.value);
}
- boost::detail::heap_delete(current_node);
+ current_thread_data->tss_data.erase(current);
}
}
@@ -301,7 +291,6 @@
{
return (get_thread_info)();
}
-
void thread::join()
{
if (this_thread::get_id() == get_id())
@@ -318,45 +307,27 @@
bool thread::timed_join(boost::system_time const& wait_until)
{
- if (this_thread::get_id() == get_id())
- {
- boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
- }
- detail::thread_data_ptr local_thread_info=(get_thread_info)();
- if(local_thread_info)
- {
- if(!this_thread::interruptible_wait(local_thread_info->thread_handle,get_milliseconds_until(wait_until)))
- {
- return false;
- }
- release_handle();
- }
- return true;
+ return do_try_join_until(get_milliseconds_until(wait_until));
}
-#ifdef BOOST_THREAD_USES_CHRONO
-
- bool thread::try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
+ bool thread::do_try_join_until(uintmax_t milli)
{
if (this_thread::get_id() == get_id())
{
- boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
+ boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
}
detail::thread_data_ptr local_thread_info=(get_thread_info)();
if(local_thread_info)
{
- chrono::milliseconds rel_time= chrono::ceil<chrono::milliseconds>(tp-chrono::system_clock::now());
- if(!this_thread::interruptible_wait(local_thread_info->thread_handle,rel_time.count()))
- {
- return false;
- }
- release_handle();
+ if(!this_thread::interruptible_wait(local_thread_info->thread_handle,milli))
+ {
+ return false;
+ }
+ release_handle();
}
return true;
}
-#endif
-
void thread::detach() BOOST_NOEXCEPT
{
release_handle();
@@ -636,14 +607,11 @@
detail::thread_data_base* const current_thread_data(get_current_thread_data());
if(current_thread_data)
{
- detail::tss_data_node* current_node=current_thread_data->tss_data;
- while(current_node)
+ std::map<void const*,tss_data_node>::iterator current_node=
+ current_thread_data->tss_data.find(key);
+ if(current_node!=current_thread_data->tss_data.end())
{
- if(current_node->key==key)
- {
- return current_node;
- }
- current_node=current_node->next;
+ return ¤t_node->second;
}
}
return NULL;
@@ -658,23 +626,43 @@
return NULL;
}
- void set_tss_data(void const* key,boost::shared_ptr<tss_cleanup_function> func,void* tss_data,bool cleanup_existing)
+ void add_new_tss_node(void const* key,
+ boost::shared_ptr<tss_cleanup_function> func,
+ void* tss_data)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ current_thread_data->tss_data.insert(std::make_pair(key,tss_data_node(func,tss_data)));
+ }
+
+ void erase_tss_node(void const* key)
+ {
+ detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
+ current_thread_data->tss_data.erase(key);
+ }
+
+ void set_tss_data(void const* key,
+ boost::shared_ptr<tss_cleanup_function> func,
+ void* tss_data,bool cleanup_existing)
{
if(tss_data_node* const current_node=find_tss_data(key))
{
- if(cleanup_existing && current_node->func.get() && current_node->value)
+ if(cleanup_existing && current_node->func && (current_node->value!=0))
{
(*current_node->func)(current_node->value);
}
- current_node->func=func;
- current_node->value=tss_data;
+ if(func || (tss_data!=0))
+ {
+ current_node->func=func;
+ current_node->value=tss_data;
+ }
+ else
+ {
+ erase_tss_node(key);
+ }
}
- else if(func && tss_data)
+ else
{
- detail::thread_data_base* const current_thread_data(get_or_make_current_thread_data());
- tss_data_node* const new_node=
- heap_new<tss_data_node>(key,func,tss_data,current_thread_data->tss_data);
- current_thread_data->tss_data=new_node;
+ add_new_tss_node(key,func,tss_data);
}
}
}
Modified: branches/release/libs/thread/test/Jamfile.v2
==============================================================================
--- branches/release/libs/thread/test/Jamfile.v2 (original)
+++ branches/release/libs/thread/test/Jamfile.v2 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -44,7 +44,7 @@
<toolset>clang:<cxxflags>-pedantic
<toolset>clang:<cxxflags>-Wno-long-long
<toolset>clang:<cxxflags>-ansi
- #<toolset>clang:<cxxflags>-fpermissive # doesn't work
+ #<toolset>clang:<cxxflags>-fpermissive # doesn't work
<toolset>gcc-mingw-4.4.0:<cxxflags>-fdiagnostics-show-option
<toolset>gcc-mingw-4.5.0:<cxxflags>-fdiagnostics-show-option
@@ -80,13 +80,13 @@
rule thread-test ( sources )
{
return
- [ run $(sources) ../build//boost_thread : : :
- <library>/boost/test//boost_unit_test_framework/<link>static
+ [ run $(sources) ../build//boost_thread : : :
+ <library>/boost/test//boost_unit_test_framework/<link>static
]
[ run $(sources) ../src/tss_null.cpp ../build//boost_thread/<link>static
- : : :
- <library>/boost/test//boost_unit_test_framework/<link>static
- : $(sources[1]:B)_lib
+ : : :
+ <library>/boost/test//boost_unit_test_framework/<link>static
+ : $(sources[1]:B)_lib
]
;
}
@@ -178,6 +178,7 @@
[ thread-test test_2309.cpp ]
[ thread-run test_2501.cpp ]
[ thread-test test_2741.cpp ]
+ [ thread-run test_3628.cpp ]
[ thread-run test_4521.cpp ]
[ thread-run test_4648.cpp ]
[ thread-run test_4882.cpp ]
@@ -188,6 +189,8 @@
[ thread-run test_6130.cpp ]
[ thread-run test_6170.cpp ]
[ thread-run test_6174.cpp ]
+ [ thread-run test_7160.cpp ]
+ [ thread-run test_7328.cpp ]
;
@@ -224,10 +227,10 @@
[ thread-run2 ./sync/conditions/cv_status/cv_status_pass.cpp : cv_status__cv_status_p ]
;
- #explicit ts_async ;
+ explicit ts_async ;
test-suite ts_async
:
- # [ thread-run2 ./sync/futures/async/async_pass.cpp : async__async_p ]
+ [ thread-run2 ./sync/futures/async/async_pass.cpp : async__async_p ]
;
#explicit ts_promise ;
@@ -532,10 +535,4 @@
[ thread-run2 ./sync/mutual_exclusion/locks/reverse_lock/types_pass.cpp : reverse_lock__types_p ]
;
- explicit ts ;
- test-suite ts
- :
- [ thread-run test_ml.cpp ]
- ;
-
}
Modified: branches/release/libs/thread/test/no_implicit_assign_from_lvalue_thread.cpp
==============================================================================
--- branches/release/libs/thread/test/no_implicit_assign_from_lvalue_thread.cpp (original)
+++ branches/release/libs/thread/test/no_implicit_assign_from_lvalue_thread.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -14,14 +14,4 @@
t2=t1;
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
-
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-
-}
+#include "./remove_error_code_unused_warning.hpp"
Modified: branches/release/libs/thread/test/no_implicit_move_from_lvalue_thread.cpp
==============================================================================
--- branches/release/libs/thread/test/no_implicit_move_from_lvalue_thread.cpp (original)
+++ branches/release/libs/thread/test/no_implicit_move_from_lvalue_thread.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -13,14 +13,4 @@
boost::thread t2(t1);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
-
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-
-}
+#include "./remove_error_code_unused_warning.hpp"
Modified: branches/release/libs/thread/test/sync/conditions/condition_variable/assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/conditions/condition_variable/assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/conditions/condition_variable/assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,5 @@
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/conditions/condition_variable/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/conditions/condition_variable/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/conditions/condition_variable/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -26,13 +26,5 @@
boost::condition_variable cv1(cv0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/conditions/condition_variable_any/assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/conditions/condition_variable_any/assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/conditions/condition_variable_any/assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -26,13 +26,5 @@
cv1 = cv0;
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/conditions/condition_variable_any/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/conditions/condition_variable_any/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/conditions/condition_variable_any/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -26,13 +26,5 @@
boost::condition_variable_any cv1(cv0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/futures/async/async_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/async/async_pass.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/async/async_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -22,6 +22,7 @@
// future<typename result_of<F(Args...)>::type>
// async(launch policy, F&& f, Args&&... args);
+#define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp>
#include <boost/thread/thread.hpp>
@@ -51,17 +52,17 @@
boost::this_thread::sleep_for(ms(200));
}
-boost::interprocess::unique_ptr<int> f3(int i)
+boost::interprocess::unique_ptr<int, boost::default_delete<int> > f3(int i)
{
boost::this_thread::sleep_for(ms(200));
- return boost::interprocess::unique_ptr<int>(new int(i));
+ return boost::interprocess::unique_ptr<int, boost::default_delete<int> >(new int(i));
}
-boost::interprocess::unique_ptr<int> f4(boost::interprocess::unique_ptr<int>&& p)
-{
- boost::this_thread::sleep_for(ms(200));
- return boost::move(p);
-}
+//boost::interprocess::unique_ptr<int, boost::default_delete<int> > f4(boost::interprocess::unique_ptr<int, boost::default_delete<int> >&& p)
+//{
+// boost::this_thread::sleep_for(ms(200));
+// return boost::move(p);
+//}
int main()
{
@@ -89,15 +90,15 @@
Clock::time_point t1 = Clock::now();
BOOST_TEST(t1 - t0 < ms(100));
}
- {
- boost::future<int> f = boost::async(boost::launch::deferred, f0);
- boost::this_thread::sleep_for(ms(300));
- Clock::time_point t0 = Clock::now();
- BOOST_TEST(f.get() == 3);
- Clock::time_point t1 = Clock::now();
- BOOST_TEST(t1 - t0 > ms(100));
- }
-
+// {
+// boost::future<int> f = boost::async(boost::launch::deferred, f0);
+// boost::this_thread::sleep_for(ms(300));
+// Clock::time_point t0 = Clock::now();
+// BOOST_TEST(f.get() == 3);
+// Clock::time_point t1 = Clock::now();
+// BOOST_TEST(t1 - t0 > ms(100));
+// }
+//
{
boost::future<int&> f = boost::async(f1);
boost::this_thread::sleep_for(ms(300));
@@ -122,15 +123,15 @@
Clock::time_point t1 = Clock::now();
BOOST_TEST(t1 - t0 < ms(100));
}
- {
- boost::future<int&> f = boost::async(boost::launch::deferred, f1);
- boost::this_thread::sleep_for(ms(300));
- Clock::time_point t0 = Clock::now();
- BOOST_TEST(&f.get() == &i);
- Clock::time_point t1 = Clock::now();
- BOOST_TEST(t1 - t0 > ms(100));
- }
-
+// {
+// boost::future<int&> f = boost::async(boost::launch::deferred, f1);
+// boost::this_thread::sleep_for(ms(300));
+// Clock::time_point t0 = Clock::now();
+// BOOST_TEST(&f.get() == &i);
+// Clock::time_point t1 = Clock::now();
+// BOOST_TEST(t1 - t0 > ms(100));
+// }
+//
{
boost::future<void> f = boost::async(f2);
boost::this_thread::sleep_for(ms(300));
@@ -155,32 +156,32 @@
Clock::time_point t1 = Clock::now();
BOOST_TEST(t1 - t0 < ms(100));
}
- {
- boost::future<void> f = boost::async(boost::launch::deferred, f2);
- boost::this_thread::sleep_for(ms(300));
- Clock::time_point t0 = Clock::now();
- f.get();
- Clock::time_point t1 = Clock::now();
- BOOST_TEST(t1 - t0 > ms(100));
- }
-
- {
- 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);
- Clock::time_point t1 = Clock::now();
- BOOST_TEST(t1 - t0 < ms(100));
- }
-
- {
- 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);
- Clock::time_point t1 = Clock::now();
- BOOST_TEST(t1 - t0 < ms(100));
- }
+// {
+// boost::future<void> f = boost::async(boost::launch::deferred, f2);
+// boost::this_thread::sleep_for(ms(300));
+// Clock::time_point t0 = Clock::now();
+// f.get();
+// Clock::time_point t1 = Clock::now();
+// BOOST_TEST(t1 - t0 > ms(100));
+// }
+
+// {
+// boost::future<boost::interprocess::unique_ptr<int, boost::default_delete<int> > > f = boost::async(f3, 3);
+// boost::this_thread::sleep_for(ms(300));
+// Clock::time_point t0 = Clock::now();
+// BOOST_TEST(*f.get() == 3);
+// Clock::time_point t1 = Clock::now();
+// BOOST_TEST(t1 - t0 < ms(100));
+// }
+
+// {
+// boost::future<boost::interprocess::unique_ptr<int, boost::default_delete<int> > > f = boost::async(f4, boost::interprocess::unique_ptr<int, boost::default_delete<int> >(new int(3)));
+// boost::this_thread::sleep_for(ms(300));
+// Clock::time_point t0 = Clock::now();
+// BOOST_TEST(*f.get() == 3);
+// Clock::time_point t1 = Clock::now();
+// BOOST_TEST(t1 - t0 < ms(100));
+// }
return boost::report_errors();
}
Modified: branches/release/libs/thread/test/sync/futures/future/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/future/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/future/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -36,13 +36,5 @@
return boost::report_errors();
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/futures/future/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/future/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/future/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -34,13 +34,5 @@
return boost::report_errors();
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/futures/future/dtor_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/future/dtor_pass.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/future/dtor_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -24,7 +24,7 @@
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
-#include <libs/thread/test/sync/futures/test_allocator.hpp>
+#include "../test_allocator.hpp"
#endif
int main()
Modified: branches/release/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/packaged_task/alloc_ctor_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -25,7 +25,7 @@
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
-#include <libs/thread/test/sync/futures/test_allocator.hpp>
+#include "../test_allocator.hpp"
double fct()
{
Modified: branches/release/libs/thread/test/sync/futures/packaged_task/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/packaged_task/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/packaged_task/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -45,13 +45,5 @@
return boost::report_errors();
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/futures/packaged_task/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/packaged_task/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/packaged_task/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -45,13 +45,5 @@
return boost::report_errors();
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/futures/packaged_task/use_allocator_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/packaged_task/use_allocator_pass.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/packaged_task/use_allocator_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -28,7 +28,7 @@
#include <boost/static_assert.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
-#include <libs/thread/test/sync/futures/test_allocator.hpp>
+#include "../test_allocator.hpp"
int main()
{
Modified: branches/release/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/promise/alloc_ctor_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -23,7 +23,7 @@
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
-#include <libs/thread/test/sync/futures/test_allocator.hpp>
+#include "../test_allocator.hpp"
int main()
{
Modified: branches/release/libs/thread/test/sync/futures/promise/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/promise/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/promise/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -31,13 +31,5 @@
return boost::report_errors();
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/futures/promise/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/promise/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/promise/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -30,13 +30,5 @@
return boost::report_errors();
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/futures/promise/move_assign_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/promise/move_assign_pass.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/promise/move_assign_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -23,7 +23,7 @@
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
-#include <libs/thread/test/sync/futures/test_allocator.hpp>
+#include "../test_allocator.hpp"
#endif
boost::mutex m0;
Modified: branches/release/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/promise/move_ctor_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -23,7 +23,7 @@
#include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
-#include <libs/thread/test/sync/futures/test_allocator.hpp>
+#include "../test_allocator.hpp"
#endif
boost::mutex m;
Modified: branches/release/libs/thread/test/sync/futures/promise/use_allocator_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/futures/promise/use_allocator_pass.cpp (original)
+++ branches/release/libs/thread/test/sync/futures/promise/use_allocator_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -25,7 +25,7 @@
#include <boost/static_assert.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
-#include <libs/thread/test/sync/futures/test_allocator.hpp>
+#include "../test_allocator.hpp"
int main()
{
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -33,13 +33,5 @@
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/lock_guard/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -32,13 +32,5 @@
boost::lock_guard<boost::mutex> lk1 = lk0;
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -29,13 +29,5 @@
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/reverse_lock/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -28,13 +28,5 @@
}
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -37,13 +37,5 @@
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock/cons/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -36,13 +36,5 @@
BOOST_TEST(lk0.owns_lock() == false);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -33,13 +33,5 @@
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/shared_lock_guard/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -32,13 +32,5 @@
boost::shared_lock_guard<boost::shared_mutex> lk1 = lk0;
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -37,13 +37,5 @@
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/cons/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -36,13 +36,5 @@
BOOST_TEST(lk0.owns_lock() == false);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/obs/op_int_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/obs/op_int_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/unique_lock/obs/op_int_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -35,13 +35,5 @@
return boost::report_errors();
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/copy_assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/copy_assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/copy_assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -37,13 +37,5 @@
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/copy_ctor_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/copy_ctor_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/locks/upgrade_lock/cons/copy_ctor_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -36,13 +36,5 @@
BOOST_TEST(lk0.owns_lock() == false);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/mutex/assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/mutex/assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/mutex/assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,5 @@
boost::mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/mutex/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/mutex/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/mutex/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,5 @@
boost::mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/recursive_mutex/assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/recursive_mutex/assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/recursive_mutex/assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,5 @@
boost::recursive_mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/recursive_mutex/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/recursive_mutex/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/recursive_mutex/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,5 @@
boost::recursive_mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,4 @@
boost::recursive_timed_mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
-
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
+#include "../../../remove_error_code_unused_warning.hpp"
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/recursive_timed_mutex/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,5 @@
boost::recursive_timed_mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/shared_mutex/assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/shared_mutex/assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/shared_mutex/assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,5 @@
boost::shared_mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/shared_mutex/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/shared_mutex/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/shared_mutex/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,15 +27,6 @@
boost::shared_mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/timed_mutex/assign_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/timed_mutex/assign_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/timed_mutex/assign_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,14 +27,5 @@
boost::timed_mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "impl/thread/test/remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-
-}
Modified: branches/release/libs/thread/test/sync/mutual_exclusion/timed_mutex/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/sync/mutual_exclusion/timed_mutex/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/sync/mutual_exclusion/timed_mutex/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -27,13 +27,4 @@
boost::timed_mutex m1(m0);
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
-
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-}
+#include "impl/thread/test/remove_error_code_unused_warning.hpp"
Modified: branches/release/libs/thread/test/test_2309.cpp
==============================================================================
--- branches/release/libs/thread/test/test_2309.cpp (original)
+++ branches/release/libs/thread/test/test_2309.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -9,54 +9,54 @@
#include <boost/thread.hpp>
- using namespace std;
+ using namespace std;
- boost::mutex mutex_;
+ boost::mutex mutex_;
- void perform()
- {
- try
- {
- boost::this_thread::sleep(boost::posix_time::seconds(100));
- }
- catch (boost::thread_interrupted& interrupt)
- {
- boost::mutex::scoped_lock lock(mutex_);
- cerr << "Thread " << boost::this_thread::get_id() << " got interrupted" << endl;
- throw(interrupt);
- }
- catch (std::exception& e)
- {
- boost::mutex::scoped_lock lock(mutex_);
- cerr << "Thread " << boost::this_thread::get_id() << " caught std::exception" << e.what() << endl;
- }
- catch (...)
- {
- boost::mutex::scoped_lock lock(mutex_);
- cerr << "Thread " << boost::this_thread::get_id() << " caught something else" << endl;
- }
- }
+ void perform()
+ {
+ try
+ {
+ boost::this_thread::sleep(boost::posix_time::seconds(100));
+ }
+ catch (boost::thread_interrupted& interrupt)
+ {
+ boost::mutex::scoped_lock lock(mutex_);
+ cerr << "Thread " << boost::this_thread::get_id() << " got interrupted" << endl;
+ throw(interrupt);
+ }
+ catch (std::exception& e)
+ {
+ boost::mutex::scoped_lock lock(mutex_);
+ cerr << "Thread " << boost::this_thread::get_id() << " caught std::exception" << e.what() << endl;
+ }
+ catch (...)
+ {
+ boost::mutex::scoped_lock lock(mutex_);
+ cerr << "Thread " << boost::this_thread::get_id() << " caught something else" << endl;
+ }
+ }
- void test()
- {
+ void test()
+ {
try
{
boost::thread_group threads;
- for (int i = 0; i < 2; ++i)
- {
- threads.create_thread(perform);
- }
-
- //boost::this_thread::sleep(1);
- threads.interrupt_all();
- threads.join_all();
+ for (int i = 0; i < 2; ++i)
+ {
+ threads.create_thread(perform);
+ }
+
+ //boost::this_thread::sleep(1);
+ threads.interrupt_all();
+ threads.join_all();
}
catch (...)
{
BOOST_CHECK(false && "exception raised");
}
- }
+ }
boost::unit_test_framework::test_suite* init_unit_test_suite(int, char*[])
{
Modified: branches/release/libs/thread/test/test_2501.cpp
==============================================================================
--- branches/release/libs/thread/test/test_2501.cpp (original)
+++ branches/release/libs/thread/test/test_2501.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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/shared_mutex.hpp>
#include <boost/thread/locks.hpp>
Modified: branches/release/libs/thread/test/test_2741.cpp
==============================================================================
--- branches/release/libs/thread/test/test_2741.cpp (original)
+++ branches/release/libs/thread/test/test_2741.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -15,7 +15,7 @@
#include <boost/test/unit_test.hpp>
#define DEFAULT_EXECUTION_MONITOR_TYPE execution_monitor::use_sleep_only
-#include <libs/thread/test/util.inl>
+#include "./util.inl"
int test_value;
#ifdef PTHREAD_STACK_MIN
Modified: branches/release/libs/thread/test/test_4521.cpp
==============================================================================
--- branches/release/libs/thread/test/test_4521.cpp (original)
+++ branches/release/libs/thread/test/test_4521.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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.hpp>
int calculate_the_answer_to_life_the_universe_and_everything()
Modified: branches/release/libs/thread/test/test_4648.cpp
==============================================================================
--- branches/release/libs/thread/test/test_4648.cpp (original)
+++ branches/release/libs/thread/test/test_4648.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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 <iostream>
#include <boost/thread.hpp>
#include <boost/current_function.hpp>
Modified: branches/release/libs/thread/test/test_4882.cpp
==============================================================================
--- branches/release/libs/thread/test/test_4882.cpp (original)
+++ branches/release/libs/thread/test/test_4882.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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/thread.hpp>
#include <boost/thread/shared_mutex.hpp>
Modified: branches/release/libs/thread/test/test_5351.cpp
==============================================================================
--- branches/release/libs/thread/test/test_5351.cpp (original)
+++ branches/release/libs/thread/test/test_5351.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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 <iostream>
#include <boost/thread.hpp>
#include <boost/date_time/posix_time/posix_time_types.hpp>
Modified: branches/release/libs/thread/test/test_5502.cpp
==============================================================================
--- branches/release/libs/thread/test/test_5502.cpp (original)
+++ branches/release/libs/thread/test/test_5502.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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)
+
// bm.cpp
// g++ test.cpp -lboost_thread-mt && ./a.out
Modified: branches/release/libs/thread/test/test_5542_1.cpp
==============================================================================
--- branches/release/libs/thread/test/test_5542_1.cpp (original)
+++ branches/release/libs/thread/test/test_5542_1.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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 <iostream>
#include <boost/thread.hpp>
Modified: branches/release/libs/thread/test/test_5542_2.cpp
==============================================================================
--- branches/release/libs/thread/test/test_5542_2.cpp (original)
+++ branches/release/libs/thread/test/test_5542_2.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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.hpp>
void run_thread() {
Modified: branches/release/libs/thread/test/test_5542_3.cpp
==============================================================================
--- branches/release/libs/thread/test/test_5542_3.cpp (original)
+++ branches/release/libs/thread/test/test_5542_3.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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 <iostream>
#include <boost/thread.hpp>
#include <boost/date_time.hpp>
Modified: branches/release/libs/thread/test/test_6130.cpp
==============================================================================
--- branches/release/libs/thread/test/test_6130.cpp (original)
+++ branches/release/libs/thread/test/test_6130.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,4 +1,10 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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.hpp>
+#include <boost/date_time/posix_time/posix_time_io.hpp>
#include <assert.h>
#include <iostream>
#include <stdlib.h>
@@ -29,6 +35,9 @@
std::cerr << "now_time =" << now_time << " \n";
std::cerr << "end_time =" << end_time << " \n";
std::cerr << "wait_time=" << wait_time << " \n";
+ std::cerr << "now_time =" << from_time_t(now_time) << " \n";
+ std::cerr << "end_time =" << from_time_t(end_time) << " \n";
+ std::cerr << "wait_time=" << from_time_t(wait_time) << " \n";
std::cerr << end_time - wait_time << " \n";
assert(end_time >= wait_time);
std::cerr << " OK\n";
Modified: branches/release/libs/thread/test/test_6170.cpp
==============================================================================
--- branches/release/libs/thread/test/test_6170.cpp (original)
+++ branches/release/libs/thread/test/test_6170.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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/shared_mutex.hpp>
#include <boost/thread/locks.hpp>
Modified: branches/release/libs/thread/test/test_condition.cpp
==============================================================================
--- branches/release/libs/thread/test/test_condition.cpp (original)
+++ branches/release/libs/thread/test/test_condition.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -13,7 +13,7 @@
#include <boost/test/unit_test.hpp>
-#include <libs/thread/test/util.inl>
+#include "./util.inl"
struct condition_test_data
{
Modified: branches/release/libs/thread/test/test_condition_notify_all.cpp
==============================================================================
--- branches/release/libs/thread/test/test_condition_notify_all.cpp (original)
+++ branches/release/libs/thread/test/test_condition_notify_all.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -9,8 +9,8 @@
#include <boost/test/unit_test.hpp>
-#include <libs/thread/test/util.inl>
-#include <libs/thread/test/condition_test_common.hpp>
+#include "./util.inl"
+#include "./condition_test_common.hpp"
unsigned const number_of_test_threads=5;
Modified: branches/release/libs/thread/test/test_condition_notify_one.cpp
==============================================================================
--- branches/release/libs/thread/test/test_condition_notify_one.cpp (original)
+++ branches/release/libs/thread/test/test_condition_notify_one.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -9,8 +9,8 @@
#include <boost/test/unit_test.hpp>
-#include <libs/thread/test/util.inl>
-#include <libs/thread/test/condition_test_common.hpp>
+#include "./util.inl"
+#include "./condition_test_common.hpp"
void do_test_condition_notify_one_wakes_from_wait()
{
Modified: branches/release/libs/thread/test/test_condition_timed_wait_times_out.cpp
==============================================================================
--- branches/release/libs/thread/test/test_condition_timed_wait_times_out.cpp (original)
+++ branches/release/libs/thread/test/test_condition_timed_wait_times_out.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -9,7 +9,7 @@
#include <boost/thread/thread.hpp>
#include <boost/test/unit_test.hpp>
-#include <libs/thread/test/util.inl>
+#include "./util.inl"
bool fake_predicate()
{
Modified: branches/release/libs/thread/test/test_ml.cpp
==============================================================================
--- branches/release/libs/thread/test/test_ml.cpp (original)
+++ branches/release/libs/thread/test/test_ml.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -1,3 +1,8 @@
+// Copyright (C) 2010 Vicente Botet
+//
+// 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/config.hpp>
#ifndef BOOST_NO_RVALUE_REFERENCES
Modified: branches/release/libs/thread/test/test_mutex.cpp
==============================================================================
--- branches/release/libs/thread/test/test_mutex.cpp (original)
+++ branches/release/libs/thread/test/test_mutex.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -15,7 +15,7 @@
#include <boost/test/unit_test.hpp>
#define DEFAULT_EXECUTION_MONITOR_TYPE execution_monitor::use_sleep_only
-#include <libs/thread/test/util.inl>
+#include "./util.inl"
template <typename M>
struct test_lock
Modified: branches/release/libs/thread/test/test_shared_mutex.cpp
==============================================================================
--- branches/release/libs/thread/test/test_shared_mutex.cpp (original)
+++ branches/release/libs/thread/test/test_shared_mutex.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -6,8 +6,8 @@
#include <boost/test/unit_test.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
-#include <libs/thread/test/util.inl>
-#include <libs/thread/test/shared_mutex_locking_thread.hpp>
+#include "./util.inl"
+#include "./shared_mutex_locking_thread.hpp"
#define CHECK_LOCKED_VALUE_EQUAL(mutex_name,value,expected_value) \
{ \
Modified: branches/release/libs/thread/test/test_shared_mutex_part_2.cpp
==============================================================================
--- branches/release/libs/thread/test/test_shared_mutex_part_2.cpp (original)
+++ branches/release/libs/thread/test/test_shared_mutex_part_2.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -6,8 +6,8 @@
#include <boost/test/unit_test.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
-#include <libs/thread/test/util.inl>
-#include <libs/thread/test/shared_mutex_locking_thread.hpp>
+#include "./util.inl"
+#include "./shared_mutex_locking_thread.hpp"
#define CHECK_LOCKED_VALUE_EQUAL(mutex_name,value,expected_value) \
{ \
Modified: branches/release/libs/thread/test/test_shared_mutex_timed_locks.cpp
==============================================================================
--- branches/release/libs/thread/test/test_shared_mutex_timed_locks.cpp (original)
+++ branches/release/libs/thread/test/test_shared_mutex_timed_locks.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -6,8 +6,8 @@
#include <boost/test/unit_test.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/xtime.hpp>
-#include <libs/thread/test/util.inl>
-#include <libs/thread/test/shared_mutex_locking_thread.hpp>
+#include "./util.inl"
+#include "./shared_mutex_locking_thread.hpp"
#define CHECK_LOCKED_VALUE_EQUAL(mutex_name,value,expected_value) \
{ \
Modified: branches/release/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp
==============================================================================
--- branches/release/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp (original)
+++ branches/release/libs/thread/test/test_shared_mutex_timed_locks_chrono.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -6,8 +6,8 @@
#include <boost/test/unit_test.hpp>
#include <boost/thread/thread.hpp>
#include <boost/thread/shared_mutex.hpp>
-#include <libs/thread/test/util.inl>
-#include <libs/thread/test/shared_mutex_locking_thread.hpp>
+#include "./util.inl"
+#include "./shared_mutex_locking_thread.hpp"
#if defined BOOST_THREAD_USES_CHRONO
Modified: branches/release/libs/thread/test/test_thread.cpp
==============================================================================
--- branches/release/libs/thread/test/test_thread.cpp (original)
+++ branches/release/libs/thread/test/test_thread.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -16,7 +16,7 @@
#include <boost/test/unit_test.hpp>
#define DEFAULT_EXECUTION_MONITOR_TYPE execution_monitor::use_sleep_only
-#include <libs/thread/test/util.inl>
+#include "./util.inl"
int test_value;
Modified: branches/release/libs/thread/test/test_tss.cpp
==============================================================================
--- branches/release/libs/thread/test/test_tss.cpp (original)
+++ branches/release/libs/thread/test/test_tss.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -13,7 +13,7 @@
#include <boost/test/unit_test.hpp>
-#include <libs/thread/test/util.inl>
+#include "./util.inl"
#include <iostream>
@@ -341,6 +341,18 @@
BOOST_CHECK(!tss_cleanup_called);
}
+void test_tss_at_the_same_adress()
+{
+ for(int i=0; i<2; i++)
+ {
+ boost::thread_specific_ptr<Dummy> local_tss(tss_custom_cleanup);
+ local_tss.reset(new Dummy);
+ tss_cleanup_called=false;
+ BOOST_CHECK(tss_cleanup_called);
+ tss_cleanup_called=false;
+ BOOST_CHECK(!tss_cleanup_called);
+ }
+}
boost::unit_test::test_suite* init_unit_test_suite(int, char*[])
Modified: branches/release/libs/thread/test/threads/thread/assign/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/threads/thread/assign/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/threads/thread/assign/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -67,14 +67,4 @@
}
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
-
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-
-}
+#include "../../../remove_error_code_unused_warning.hpp"
Modified: branches/release/libs/thread/test/threads/thread/constr/copy_fail.cpp
==============================================================================
--- branches/release/libs/thread/test/threads/thread/constr/copy_fail.cpp (original)
+++ branches/release/libs/thread/test/threads/thread/constr/copy_fail.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -82,14 +82,5 @@
}
}
-void remove_unused_warning()
-{
- //../../../boost/system/error_code.hpp:214:36: warning: Ôboost::system::posix_categoryÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:215:36: warning: Ôboost::system::errno_ecatÕ defined but not used [-Wunused-variable]
- //../../../boost/system/error_code.hpp:216:36: warning: Ôboost::system::native_ecatÕ defined but not used [-Wunused-variable]
+#include "../../../remove_error_code_unused_warning.hpp"
- (void)boost::system::posix_category;
- (void)boost::system::errno_ecat;
- (void)boost::system::native_ecat;
-
-}
Modified: branches/release/libs/thread/test/threads/thread/members/join_pass.cpp
==============================================================================
--- branches/release/libs/thread/test/threads/thread/members/join_pass.cpp (original)
+++ branches/release/libs/thread/test/threads/thread/members/join_pass.cpp 2012-09-08 10:59:26 EDT (Sat, 08 Sep 2012)
@@ -53,7 +53,6 @@
void operator()()
{
BOOST_TEST(alive_ == 1);
- std::cout << __FILE__ << ":" << __LINE__ <<" " << n_alive << std::endl;
BOOST_TEST(n_alive == 1);
op_run = true;
}
@@ -62,58 +61,73 @@
int G::n_alive = 0;
bool G::op_run = false;
-boost::thread* resource_deadlock_would_occur_th;
+boost::thread* resource_deadlock_would_occur_th=0;
boost::mutex resource_deadlock_would_occur_mtx;
void resource_deadlock_would_occur_tester()
{
try
{
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
boost::unique_lock<boost::mutex> lk(resource_deadlock_would_occur_mtx);
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
+
resource_deadlock_would_occur_th->join();
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
BOOST_TEST(false);
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
}
catch (boost::system::system_error& e)
{
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
BOOST_TEST(e.code().value() == boost::system::errc::resource_deadlock_would_occur);
}
catch (...)
{
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
BOOST_TEST(false&&"exception thrown");
}
}
+void throws_thread_resource_error_tester()
+{
+ {
+ try {
+ boost::throw_exception(
+ boost::thread_resource_error(
+ boost::system::errc::resource_deadlock_would_occur,
+ "boost thread: trying joining itself"
+ ));
+ BOOST_TEST(false);
+ }
+ catch (boost::system::system_error& e)
+ {
+ BOOST_TEST(e.code().value() == boost::system::errc::resource_deadlock_would_occur);
+ }
+ catch (...)
+ {
+ BOOST_TEST(false&&"exception thrown");
+ }
+ }
+}
+
int main()
{
{
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
boost::thread t0( (G()));
BOOST_TEST(t0.joinable());
t0.join();
BOOST_TEST(!t0.joinable());
}
+
+ {
+ boost::thread t0( throws_thread_resource_error_tester );
+ t0.join();
+ }
{
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
boost::unique_lock<boost::mutex> lk(resource_deadlock_would_occur_mtx);
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
boost::thread t0( resource_deadlock_would_occur_tester );
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
resource_deadlock_would_occur_th = &t0;
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
BOOST_TEST(t0.joinable());
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
lk.unlock();
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
+ boost::this_thread::sleep_for(boost::chrono::milliseconds(100));
+ boost::unique_lock<boost::mutex> lk2(resource_deadlock_would_occur_mtx);
t0.join();
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
BOOST_TEST(!t0.joinable());
- std::cout << __FILE__ << ":" << __LINE__ <<" " << std::endl;
}
// {
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