2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-07 10:52:10 +00:00

Compare commits

...

38 Commits

Author SHA1 Message Date
Andrey Semashev
ac15f907be Fix warnings about missing sized deallocation operator in C++14 mode. 2026-02-06 15:45:40 +03:00
Andrey Semashev
e2f6e8789f Fixed uninitialized variable warnings. 2026-02-06 15:21:11 +03:00
Andrey Semashev
24917577d7 Silence unused variable warnings. 2026-02-06 15:14:21 +03:00
Andrey Semashev
6da5c6d418 Updated no_exceptions_support.hpp include to the up-to-date location. 2026-02-06 15:08:13 +03:00
Andrey Semashev
de9eb0ee7d Fix signed/unsigned a mismatch warning. 2026-02-06 15:06:51 +03:00
Andrey Semashev
f19c0d3b56 Removed usage of deprecated Boost.Test header. 2026-02-06 15:05:38 +03:00
Andrey Semashev
3d95d2366e Optimize run_it construction/assignment from rvalue references.
Also fix code indentation.
2026-02-06 14:58:10 +03:00
Andrey Semashev
ed7171099b Silence MSVC warning about unreferenced formal parameter.
Closes https://github.com/boostorg/thread/pull/382.
2026-02-06 14:34:14 +03:00
Andrey Semashev
36f63a1b63 Merge pull request #331 from marcusb/patch-1
Non-template function needs inline
2026-02-06 14:05:38 +03:00
Andrey Semashev
2a953f1c4b Merge pull request #309 from Lastique/fix_bind_warnings
Cleanup header includes
2026-02-06 14:04:41 +03:00
Andrey Semashev
c34d1fd2d9 Merge pull request #327 from giomasce-throwaway/develop
Fix typos in copyright headers.
2026-02-06 14:00:01 +03:00
Andrey Semashev
be42bd8d10 Merge pull request #398 from georgthegreat/patch-1
Use forward slashes to separate include files
2026-02-06 13:58:36 +03:00
Andrey Semashev
45e77a932f Merge pull request #401 from bazelboost/add-missing-assert-header
add missing assert header in pthreads_helpers.hpp
2026-02-06 13:57:07 +03:00
Andrey Semashev
b712fac6cc Merge pull request #417 from Lastique/feature/remove_static_assert
Remove dependencies on Boost.StaticAssert
2026-02-06 13:55:25 +03:00
Andrey Semashev
ca6b6affec Remove dependencies on Boost.StaticAssert.
Boost.StaticAssert has been merged into Boost.Config, so remove
the dependency.
2026-01-22 19:47:42 +03:00
Peter Dimov
a1f89c9518 Merge pull request #403 from grafikrobot/modular
Add support for modular build structure.
2025-05-02 19:21:55 +03:00
Rene Rivera
28d58852bb Move the include usage req to the library build target. 2025-04-14 20:26:31 -05:00
Rene Rivera
4e0a88853a Sync from upstream. 2025-04-04 21:39:22 -05:00
Peter Dimov
5d68c9c42c Merge pull request #408 from arvid-norlander/bugfix/fix-build-on-clang-19
Fix build on clang-19
2025-03-12 04:05:27 +02:00
Peter Dimov
b3183638cb Update ci.yml 2025-03-12 03:19:41 +02:00
Peter Dimov
48482ff696 Apply Node20 workaround 2024-12-15 20:49:55 +02:00
Peter Dimov
76411e5918 Update ci.yml 2024-12-15 20:49:55 +02:00
Arvid Norlander
49ccf9c30a Fix build on clang-19 (which checks more things in uninstantiated templates)
Fixes issue #402
2024-11-08 16:48:43 +01:00
Rene Rivera
814ed9f341 Update build deps. 2024-08-09 22:26:06 -05:00
Rene Rivera
82aa252a9e Move inter-lib dependencies to a project variable and into the build targets. 2024-07-23 22:34:22 -05:00
Rene Rivera
b1ff784e51 Update copyright dates. 2024-07-20 22:52:03 -05:00
Rene Rivera
e6e4e53807 Bump B2 require to 5.2 2024-06-14 11:33:56 -05:00
Rene Rivera
0fc00ec05c Update dependencies. 2024-05-13 21:47:48 -05:00
Rene Rivera
435a623e48 Add requires-b2 check to top-level build file. 2024-05-05 09:00:01 -05:00
Ezekiel Warren
0a8c93842e fix: modify pthread_helpers adding missing assert header 2024-04-30 00:18:27 -07:00
Rene Rivera
ca4b54f96c Add missing NO_LIB usage requirements. 2024-04-28 20:17:11 -05:00
Rene Rivera
43bfe9cbd2 Switch to library requirements instead of source. As source puts extra source in install targets. 2024-03-29 21:16:00 -05:00
Rene Rivera
691b64d5aa Put back removing qualified boostcpp tag. As we need it until the Jamroot removes the qualified tag. 2024-03-17 18:34:13 -05:00
Rene Rivera
e2de571359 Make the library modular usable. 2024-03-11 08:38:17 -05:00
Yuriy Chernyshov
8811487643 Use forward slashes to separate include files
We use automatic dependency tracking for #includes, and wrl includes have to be tracked differently whenever we are cross-compiling the code.

This PR unifies such tracking. Forward slashes work just fine on Windows.
2024-02-04 13:03:02 +01:00
Marcus Better
7e2cd262ce Non-template function needs inline
This is to prevent multiple definition of the symbol when the file is included from multiple modules.
2020-12-07 21:23:44 -05:00
Giovanni Mascellani
637ceec996 Fix typos in copyright headers. 2020-10-11 17:34:08 +02:00
Andrey Semashev
ee609e8806 Cleanup header includes.
1. Make inclusion of boost/bind/bind.hpp conditional in some cases, when the
   code actually conditionally uses boost::bind. Reduces compile-time overhead
   and fixes https://github.com/boostorg/thread/issues/307.

2. Remove some unnecessary uses of boost::ref. This allows to avoid including
   boost/core/ref.hpp in a few places, and avoids the associated template
   instantiation overhead in others.

3. Replace deprecated header includes with the more recent alternatives. For
   example: boost/detail/lightweight_test.hpp -> boost/core/lightweight_test.hpp,
   boost/ref.hpp -> boost/core/ref.hpp.

4. Replace some blanket includes with the more fine-grained ones. For example,
   boost/utility.hpp, boost/atomic.hpp. This reduces compile time overhead.

5. Add some missing includes, for example, boost/core/ref.hpp and
   boost/type_traits/is_same.hpp.

6. Replace uses of std::is_same with boost::is_same (with the corresponding
   included header) since the standard type_traits header presence and validity
   is not tested by the code. Using boost::is_same makes the code more portable.
2020-04-05 01:51:58 +03:00
375 changed files with 696 additions and 531 deletions

View File

@@ -18,52 +18,71 @@ jobs:
matrix: matrix:
include: include:
- toolset: gcc-4.8 - toolset: gcc-4.8
os: ubuntu-latest
container: ubuntu:18.04
cxxstd: 11 cxxstd: 11
container: ubuntu:18.04
os: ubuntu-latest
install: g++-4.8 install: g++-4.8
- toolset: gcc-5 - toolset: gcc-5
cxxstd: 11 cxxstd: 11
os: ubuntu-latest
container: ubuntu:18.04 container: ubuntu:18.04
os: ubuntu-latest
install: g++-5 install: g++-5
- toolset: gcc-7 - toolset: gcc-7
os: ubuntu-20.04 container: ubuntu:18.04
install: g++-7 os: ubuntu-latest
- toolset: gcc-9 - toolset: gcc-9
os: ubuntu-20.04 container: ubuntu:20.04
os: ubuntu-latest
- toolset: gcc-11 - toolset: gcc-11
os: ubuntu-22.04 os: ubuntu-22.04
- toolset: gcc-13
os: ubuntu-24.04
- toolset: clang
container: ubuntu:20.04
os: ubuntu-latest
install: clang
- toolset: clang - toolset: clang
compiler: clang++-15
cxxstd: 20
os: ubuntu-22.04 os: ubuntu-22.04
install: clang-15
- toolset: clang - toolset: clang
os: macos-11 cxxstd: 20
cxxstd: 11 os: ubuntu-24.04
- toolset: clang
os: macos-12
cxxstd: 14
- toolset: clang - toolset: clang
os: macos-13 os: macos-13
cxxstd: 11
- toolset: clang
os: macos-14
cxxstd: 14
- toolset: clang
os: macos-15
cxxstd: 17 cxxstd: 17
runs-on: ${{matrix.os}} runs-on: ${{matrix.os}}
container: ${{matrix.container}}
container:
image: ${{matrix.container}}
volumes:
- /node20217:/node20217:rw,rshared
- ${{ startsWith(matrix.container, 'ubuntu:1') && '/node20217:/__e/node20:ro,rshared' || ' ' }}
defaults: defaults:
run: run:
shell: bash shell: bash
steps: steps:
- uses: actions/checkout@v3
- name: Setup container environment - name: Setup container environment
if: matrix.container if: matrix.container
run: | run: |
apt-get update apt-get update
apt-get -y install sudo python3 git g++ apt-get -y install sudo python3 git g++ curl xz-utils
- name: Install nodejs20glibc2.17
if: ${{ startsWith( matrix.container, 'ubuntu:1' ) }}
run: |
curl -LO https://archives.boost.io/misc/node/node-v20.9.0-linux-x64-glibc-217.tar.xz
tar -xf node-v20.9.0-linux-x64-glibc-217.tar.xz --strip-components 1 -C /node20217
ldd /__e/node20/bin/node
- uses: actions/checkout@v4
- name: Install packages - name: Install packages
if: matrix.install if: matrix.install

View File

@@ -69,7 +69,6 @@ target_link_libraries(boost_thread
Boost::predef Boost::predef
Boost::preprocessor Boost::preprocessor
Boost::smart_ptr Boost::smart_ptr
Boost::static_assert
Boost::system Boost::system
Boost::throw_exception Boost::throw_exception
Boost::tuple Boost::tuple

45
build.jam Normal file
View File

@@ -0,0 +1,45 @@
# Copyright René Ferdinand Rivera Morell 2023-2024
# 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)
require-b2 5.2 ;
constant boost_dependencies :
/boost/assert//boost_assert
/boost/atomic//boost_atomic
/boost/bind//boost_bind
/boost/chrono//boost_chrono
/boost/concept_check//boost_concept_check
/boost/config//boost_config
/boost/container//boost_container
/boost/container_hash//boost_container_hash
/boost/core//boost_core
/boost/date_time//boost_date_time
/boost/exception//boost_exception
/boost/function//boost_function
/boost/io//boost_io
/boost/move//boost_move
/boost/optional//boost_optional
/boost/predef//boost_predef
/boost/preprocessor//boost_preprocessor
/boost/smart_ptr//boost_smart_ptr
/boost/system//boost_system
/boost/throw_exception//boost_throw_exception
/boost/tuple//boost_tuple
/boost/type_traits//boost_type_traits
/boost/utility//boost_utility
/boost/winapi//boost_winapi ;
project /boost/thread
;
explicit
[ alias boost_thread : build//boost_thread ]
[ alias all : boost_thread example test ]
;
call-if : boost-library thread
: install boost_thread
;

View File

@@ -35,18 +35,22 @@
import os ; import os ;
import indirect ; import indirect ;
import path ; import path ;
import configure ; import configure ;
import threadapi-feature ; import threadapi-feature ;
exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ; exe has_atomic_flag_lockfree : ../build/has_atomic_flag_lockfree_test.cpp ;
project boost/thread project
: source-location ../src : source-location ../src
: common-requirements
<library>$(boost_dependencies)
<include>../include
: requirements <threading>multi : requirements <threading>multi
#<link>static:<define>BOOST_THREAD_STATIC_LINK=1 #<link>static:<define>BOOST_THREAD_STATIC_LINK=1
#<link>shared:<define>BOOST_THREAD_DYN_LINK=1 #<link>shared:<define>BOOST_THREAD_DYN_LINK=1
<link>static:<define>BOOST_THREAD_BUILD_LIB=1 <link>static:<define>BOOST_THREAD_BUILD_LIB=1
<link>shared:<define>BOOST_THREAD_BUILD_DLL=1 <link>shared:<define>BOOST_THREAD_BUILD_DLL=1
-<tag>@%boostcpp.tag
-<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
<tag>@$(__name__).tag <tag>@$(__name__).tag
<toolset>gcc:<cxxflags>-Wno-long-long <toolset>gcc:<cxxflags>-Wno-long-long
@@ -139,6 +143,7 @@ project boost/thread
#<define>BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED #<define>BOOST_THREAD_THROW_IF_PRECONDITION_NOT_SATISFIED
#<define>BOOST_SYSTEM_NO_DEPRECATED #<define>BOOST_SYSTEM_NO_DEPRECATED
#<define>BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS #<define>BOOST_THREAD_DONT_PROVIDE_INTERRUPTIONS
<define>BOOST_THREAD_NO_LIB=1
; ;
rule tag ( name : type ? : property-set ) rule tag ( name : type ? : property-set )
@@ -156,8 +161,15 @@ rule tag ( name : type ? : property-set )
} }
# forward to the boost tagging rule # forward to the boost tagging rule
return [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag if $(BOOST_JAMROOT_MODULE)
$(result) : $(type) : $(property-set) ] ; {
return [ indirect.call $(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag
$(result) : $(type) : $(property-set) ] ;
}
else
{
return $(result) ;
}
} }
rule win32_pthread_paths ( properties * ) rule win32_pthread_paths ( properties * )
@@ -269,10 +281,10 @@ rule requirements ( properties * )
} }
} }
result += <define>BOOST_THREAD_DONT_USE_CHRONO ; result += <define>BOOST_THREAD_DONT_USE_CHRONO ;
if ! [ configure.builds has_atomic_flag_lockfree if ! [ configure.builds has_atomic_flag_lockfree
: $(properties) : "lockfree boost::atomic_flag" ] { : $(properties) : "lockfree boost::atomic_flag" ] {
result += <library>/boost/atomic//boost_atomic ; result += <library>/boost/atomic//boost_atomic ;
} }
} else { } else {
if <threadapi>win32 in $(properties) if <threadapi>win32 in $(properties)
{ {
@@ -315,5 +327,3 @@ lib boost_thread
<link>static:<define>BOOST_THREAD_USE_LIB=1 <link>static:<define>BOOST_THREAD_USE_LIB=1
<conditional>@usage-requirements <conditional>@usage-requirements
; ;
boost-install boost_thread ;

View File

@@ -1,5 +1,5 @@
[/ [/
(C) Copyright 20012 Vicente J. Botet Escriba. (C) Copyright 2012 Vicente J. Botet Escriba.
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt). http://www.boost.org/LICENSE_1_0.txt).

View File

@@ -1,6 +1,6 @@
[/ [/
(C) Copyright 2007-12 Anthony Williams. (C) Copyright 2007-12 Anthony Williams.
(C) Copyright 20012 Vicente J. Botet Escriba. (C) Copyright 2012 Vicente J. Botet Escriba.
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt). http://www.boost.org/LICENSE_1_0.txt).

View File

@@ -1,6 +1,6 @@
[/ [/
(C) Copyright 2008-9 Anthony Williams. (C) Copyright 2008-9 Anthony Williams.
(C) Copyright 12 Vicente J. Botet Escriba. (C) Copyright 2012 Vicente J. Botet Escriba.
Distributed under the Boost Software License, Version 1.0. Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at (See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt). http://www.boost.org/LICENSE_1_0.txt).

View File

@@ -4,7 +4,7 @@
# Distributed under the Boost Software License, Version 1.0. (See accompanying # Distributed under the Boost Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
project boost/thread/example project
: requirements <library>../build//boost_thread <threading>multi : requirements <library>../build//boost_thread <threading>multi
; ;

View File

@@ -12,6 +12,7 @@
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#include <boost/bind/bind.hpp> #include <boost/bind/bind.hpp>
#include <boost/core/ref.hpp>
#include <boost/thread/detail/config.hpp> #include <boost/thread/detail/config.hpp>
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
@@ -187,7 +188,7 @@ namespace detail
template <class ValueType, class Queue> template <class ValueType, class Queue>
bool sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk) bool sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk)
{ {
cond_.wait(lk, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk))); cond_.wait(lk, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, this, boost::ref(lk)));
if (! empty(lk)) return false; // success if (! empty(lk)) return false; // success
return true; // closed return true; // closed
} }
@@ -196,7 +197,7 @@ namespace detail
template <class WClock, class Duration> template <class WClock, class Duration>
queue_op_status sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp) queue_op_status sync_deque_base<ValueType, Queue>::wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp)
{ {
if (! cond_.wait_until(lk, tp, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk)))) if (! cond_.wait_until(lk, tp, boost::bind(&sync_deque_base<ValueType, Queue>::not_empty_or_closed, this, boost::ref(lk))))
return queue_op_status::timeout; return queue_op_status::timeout;
if (! empty(lk)) return queue_op_status::success; if (! empty(lk)) return queue_op_status::success;
return queue_op_status::closed; return queue_op_status::closed;

View File

@@ -12,6 +12,7 @@
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////
#include <boost/bind/bind.hpp> #include <boost/bind/bind.hpp>
#include <boost/core/ref.hpp>
#include <boost/thread/detail/config.hpp> #include <boost/thread/detail/config.hpp>
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
@@ -187,7 +188,7 @@ namespace detail
template <class ValueType, class Queue> template <class ValueType, class Queue>
bool sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk) bool sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed(unique_lock<mutex>& lk)
{ {
cond_.wait(lk, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk))); cond_.wait(lk, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, this, boost::ref(lk)));
if (! empty(lk)) return false; // success if (! empty(lk)) return false; // success
return true; // closed return true; // closed
} }
@@ -196,7 +197,7 @@ namespace detail
template <class WClock, class Duration> template <class WClock, class Duration>
queue_op_status sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp) queue_op_status sync_queue_base<ValueType, Queue>::wait_until_not_empty_or_closed_until(unique_lock<mutex>& lk, chrono::time_point<WClock,Duration> const&tp)
{ {
if (! cond_.wait_until(lk, tp, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, boost::ref(*this), boost::ref(lk)))) if (! cond_.wait_until(lk, tp, boost::bind(&sync_queue_base<ValueType, Queue>::not_empty_or_closed, this, boost::ref(lk))))
return queue_op_status::timeout; return queue_op_status::timeout;
if (! empty(lk)) return queue_op_status::success; if (! empty(lk)) return queue_op_status::success;
return queue_op_status::closed; return queue_op_status::closed;

View File

@@ -30,7 +30,6 @@
#include <algorithm> #include <algorithm>
#include <boost/core/ref.hpp> #include <boost/core/ref.hpp>
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
#include <boost/bind/bind.hpp>
#include <stdlib.h> #include <stdlib.h>
#include <memory> #include <memory>
#include <boost/core/enable_if.hpp> #include <boost/core/enable_if.hpp>
@@ -47,6 +46,8 @@
#if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) #if defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)
#include <tuple> #include <tuple>
#else
#include <boost/bind/bind.hpp>
#endif #endif
#include <boost/config/abi_prefix.hpp> #include <boost/config/abi_prefix.hpp>

View File

@@ -51,7 +51,7 @@ BOOST_THREAD_INLINE_NAMESPACE(v2)
namespace detail namespace detail
{ {
void handle_task_region_exceptions(exception_list& errors) inline void handle_task_region_exceptions(exception_list& errors)
{ {
try { try {
throw; throw;

View File

@@ -392,7 +392,7 @@ namespace boost
is_deferred_=false; is_deferred_=false;
execute(lk); execute(lk);
} }
waiters.wait(lk, boost::bind(&shared_state_base::is_done, boost::ref(*this))); waiters.wait(lk, boost::bind(&shared_state_base::is_done, this));
if(rethrow && exception) if(rethrow && exception)
{ {
boost::rethrow_exception(exception); boost::rethrow_exception(exception);
@@ -419,7 +419,7 @@ namespace boost
return false; return false;
do_callback(lock); do_callback(lock);
return waiters.timed_wait(lock, rel_time, boost::bind(&shared_state_base::is_done, boost::ref(*this))); return waiters.timed_wait(lock, rel_time, boost::bind(&shared_state_base::is_done, this));
} }
bool timed_wait_until(boost::system_time const& target_time) bool timed_wait_until(boost::system_time const& target_time)
@@ -429,7 +429,7 @@ namespace boost
return false; return false;
do_callback(lock); do_callback(lock);
return waiters.timed_wait(lock, target_time, boost::bind(&shared_state_base::is_done, boost::ref(*this))); return waiters.timed_wait(lock, target_time, boost::bind(&shared_state_base::is_done, this));
} }
#endif #endif
#ifdef BOOST_THREAD_USES_CHRONO #ifdef BOOST_THREAD_USES_CHRONO
@@ -442,7 +442,7 @@ namespace boost
if (is_deferred_) if (is_deferred_)
return future_status::deferred; return future_status::deferred;
do_callback(lock); do_callback(lock);
if(!waiters.wait_until(lock, abs_time, boost::bind(&shared_state_base::is_done, boost::ref(*this)))) if(!waiters.wait_until(lock, abs_time, boost::bind(&shared_state_base::is_done, this)))
{ {
return future_status::timeout; return future_status::timeout;
} }
@@ -939,7 +939,7 @@ namespace boost
join(); join();
#elif defined BOOST_THREAD_ASYNC_FUTURE_WAITS #elif defined BOOST_THREAD_ASYNC_FUTURE_WAITS
unique_lock<boost::mutex> lk(this->mutex); unique_lock<boost::mutex> lk(this->mutex);
this->waiters.wait(lk, boost::bind(&shared_state_base::is_done, boost::ref(*this))); this->waiters.wait(lk, boost::bind(&shared_state_base::is_done, this));
#endif #endif
} }
@@ -4649,32 +4649,34 @@ namespace detail
shared_ptr<FutureExecutorContinuationSharedState> that_; shared_ptr<FutureExecutorContinuationSharedState> that_;
#if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES) #if ! defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
BOOST_THREAD_COPYABLE_AND_MOVABLE(run_it) BOOST_THREAD_COPYABLE_AND_MOVABLE(run_it)
run_it(run_it const& x) //BOOST_NOEXCEPT run_it(run_it const& x) //BOOST_NOEXCEPT
: that_(x.that_) : that_(x.that_)
{} {}
run_it& operator=(BOOST_THREAD_COPY_ASSIGN_REF(run_it) x) //BOOST_NOEXCEPT run_it& operator=(BOOST_THREAD_COPY_ASSIGN_REF(run_it) x) //BOOST_NOEXCEPT
{ {
if (this != &x) { if (this != &x) {
that_=x.that_; that_=x.that_;
}
return *this;
} }
// move return *this;
run_it(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT }
: that_(x.that_) // move
{ run_it(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT
x.that_.reset(); : that_(boost::move(x.that_))
} {
run_it& operator=(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT { }
if (this != &x) { run_it& operator=(BOOST_THREAD_RV_REF(run_it) x) BOOST_NOEXCEPT {
that_=x.that; if (this != &x) {
x.that_.reset(); that_ = boost::move(x.that_);
}
return *this;
} }
return *this;
}
run_it(shared_ptr<FutureExecutorContinuationSharedState> that) : that_(boost::move(that))
{}
#else
run_it(shared_ptr<FutureExecutorContinuationSharedState> that) : that_(that)
{}
#endif #endif
run_it(shared_ptr<FutureExecutorContinuationSharedState> that) : that_ (that) {}
void operator()() void operator()()
{ {

View File

@@ -19,14 +19,17 @@
#include <boost/thread/detail/delete.hpp> #include <boost/thread/detail/delete.hpp>
#include <boost/core/no_exceptions_support.hpp> #include <boost/core/no_exceptions_support.hpp>
#include <boost/bind/bind.hpp>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/config/abi_prefix.hpp>
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>
#include <pthread.h> #include <pthread.h>
#include <csignal> #include <csignal>
#if !defined(BOOST_THREAD_PROVIDES_INVOKE) && !defined(BOOST_THREAD_PROVIDES_INVOKE_RET)
#include <boost/bind/bind.hpp>
#endif
#include <boost/config/abi_prefix.hpp>
namespace boost namespace boost
{ {

View File

@@ -16,8 +16,12 @@
#include <boost/thread/detail/move.hpp> #include <boost/thread/detail/move.hpp>
#include <boost/thread/detail/invoke.hpp> #include <boost/thread/detail/invoke.hpp>
#include <boost/core/no_exceptions_support.hpp> #include <boost/core/no_exceptions_support.hpp>
#include <boost/atomic/capabilities.hpp>
#include <boost/atomic/atomic.hpp>
#if !defined(BOOST_THREAD_PROVIDES_INVOKE) && !defined(BOOST_THREAD_PROVIDES_INVOKE_RET)
#include <boost/bind/bind.hpp> #include <boost/bind/bind.hpp>
#include <boost/atomic.hpp> #endif
#include <boost/config/abi_prefix.hpp> #include <boost/config/abi_prefix.hpp>

View File

@@ -9,6 +9,7 @@
#include <boost/thread/detail/config.hpp> #include <boost/thread/detail/config.hpp>
#include <boost/throw_exception.hpp> #include <boost/throw_exception.hpp>
#include <boost/assert.hpp>
#include <pthread.h> #include <pthread.h>
#include <errno.h> #include <errno.h>

View File

@@ -171,7 +171,7 @@ namespace boost
boost::this_thread::disable_interruption do_not_disturb; boost::this_thread::disable_interruption do_not_disturb;
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
shared_cond.wait(lk, boost::bind(&state_data::can_lock_shared, boost::ref(state))); shared_cond.wait(lk, boost::bind(&state_data::can_lock_shared, &state));
state.lock_shared(); state.lock_shared();
} }
@@ -194,7 +194,7 @@ namespace boost
boost::this_thread::disable_interruption do_not_disturb; boost::this_thread::disable_interruption do_not_disturb;
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_shared, boost::ref(state)))) if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_shared, &state)))
{ {
return false; return false;
} }
@@ -209,7 +209,7 @@ namespace boost
boost::this_thread::disable_interruption do_not_disturb; boost::this_thread::disable_interruption do_not_disturb;
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_shared, boost::ref(state)))) if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_shared, &state)))
{ {
return false; return false;
} }
@@ -230,7 +230,7 @@ namespace boost
boost::this_thread::disable_interruption do_not_disturb; boost::this_thread::disable_interruption do_not_disturb;
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_shared, boost::ref(state)))) if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_shared, &state)))
{ {
return false; return false;
} }
@@ -270,7 +270,7 @@ namespace boost
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
state.exclusive_waiting_blocked=true; state.exclusive_waiting_blocked=true;
exclusive_cond.wait(lk, boost::bind(&state_data::can_lock, boost::ref(state))); exclusive_cond.wait(lk, boost::bind(&state_data::can_lock, &state));
state.exclusive=true; state.exclusive=true;
} }
@@ -282,7 +282,7 @@ namespace boost
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
state.exclusive_waiting_blocked=true; state.exclusive_waiting_blocked=true;
if(!exclusive_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock, boost::ref(state)))) if(!exclusive_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock, &state)))
{ {
state.exclusive_waiting_blocked=false; state.exclusive_waiting_blocked=false;
release_waiters(); release_waiters();
@@ -300,7 +300,7 @@ namespace boost
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
state.exclusive_waiting_blocked=true; state.exclusive_waiting_blocked=true;
if(!exclusive_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock, boost::ref(state)))) if(!exclusive_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock, &state)))
{ {
state.exclusive_waiting_blocked=false; state.exclusive_waiting_blocked=false;
release_waiters(); release_waiters();
@@ -324,7 +324,7 @@ namespace boost
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
state.exclusive_waiting_blocked=true; state.exclusive_waiting_blocked=true;
if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock, boost::ref(state)))) if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock, &state)))
{ {
state.exclusive_waiting_blocked=false; state.exclusive_waiting_blocked=false;
release_waiters(); release_waiters();
@@ -362,7 +362,7 @@ namespace boost
boost::this_thread::disable_interruption do_not_disturb; boost::this_thread::disable_interruption do_not_disturb;
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
shared_cond.wait(lk, boost::bind(&state_data::can_lock_upgrade, boost::ref(state))); shared_cond.wait(lk, boost::bind(&state_data::can_lock_upgrade, &state));
state.lock_shared(); state.lock_shared();
state.upgrade=true; state.upgrade=true;
} }
@@ -374,7 +374,7 @@ namespace boost
boost::this_thread::disable_interruption do_not_disturb; boost::this_thread::disable_interruption do_not_disturb;
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_upgrade, boost::ref(state)))) if(!shared_cond.timed_wait(lk, timeout, boost::bind(&state_data::can_lock_upgrade, &state)))
{ {
return false; return false;
} }
@@ -390,7 +390,7 @@ namespace boost
boost::this_thread::disable_interruption do_not_disturb; boost::this_thread::disable_interruption do_not_disturb;
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state)))) if(!shared_cond.timed_wait(lk, relative_time, boost::bind(&state_data::can_lock_upgrade, &state)))
{ {
return false; return false;
} }
@@ -412,7 +412,7 @@ namespace boost
boost::this_thread::disable_interruption do_not_disturb; boost::this_thread::disable_interruption do_not_disturb;
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state)))) if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, &state)))
{ {
return false; return false;
} }
@@ -457,7 +457,7 @@ namespace boost
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
state.assert_lock_upgraded(); state.assert_lock_upgraded();
state.unlock_shared(); state.unlock_shared();
upgrade_cond.wait(lk, boost::bind(&state_data::no_shared, boost::ref(state))); upgrade_cond.wait(lk, boost::bind(&state_data::no_shared, &state));
state.upgrade=false; state.upgrade=false;
state.exclusive=true; state.exclusive=true;
state.assert_locked(); state.assert_locked();
@@ -511,7 +511,7 @@ namespace boost
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
state.assert_lock_upgraded(); state.assert_lock_upgraded();
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, boost::ref(state)))) if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, &state)))
{ {
return false; return false;
} }
@@ -569,7 +569,7 @@ namespace boost
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
state.assert_lock_shared(); state.assert_lock_shared();
if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, boost::ref(state)))) if(!shared_cond.wait_until(lk, abs_time, boost::bind(&state_data::one_shared, &state)))
{ {
return false; return false;
} }
@@ -623,7 +623,7 @@ namespace boost
#endif #endif
boost::unique_lock<boost::mutex> lk(state_change); boost::unique_lock<boost::mutex> lk(state_change);
state.assert_lock_shared(); state.assert_lock_shared();
if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, boost::ref(state)))) if(!exclusive_cond.wait_until(lk, abs_time, boost::bind(&state_data::can_lock_upgrade, &state)))
{ {
return false; return false;
} }

View File

@@ -275,9 +275,9 @@ namespace boost {
inline void shared_mutex::lock() inline void shared_mutex::lock()
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
gate1_.wait(lk, boost::bind(&shared_mutex::no_writer, boost::ref(*this))); gate1_.wait(lk, boost::bind(&shared_mutex::no_writer, this));
state_ |= write_entered_; state_ |= write_entered_;
gate2_.wait(lk, boost::bind(&shared_mutex::no_readers, boost::ref(*this))); gate2_.wait(lk, boost::bind(&shared_mutex::no_readers, this));
} }
inline bool shared_mutex::try_lock() inline bool shared_mutex::try_lock()
@@ -298,13 +298,13 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.wait_until(lk, abs_time, boost::bind( if (!gate1_.wait_until(lk, abs_time, boost::bind(
&shared_mutex::no_writer, boost::ref(*this)))) &shared_mutex::no_writer, this)))
{ {
return false; return false;
} }
state_ |= write_entered_; state_ |= write_entered_;
if (!gate2_.wait_until(lk, abs_time, boost::bind( if (!gate2_.wait_until(lk, abs_time, boost::bind(
&shared_mutex::no_readers, boost::ref(*this)))) &shared_mutex::no_readers, this)))
{ {
state_ &= ~write_entered_; state_ &= ~write_entered_;
return false; return false;
@@ -319,13 +319,13 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind( if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
&shared_mutex::no_writer, boost::ref(*this)))) &shared_mutex::no_writer, this)))
{ {
return false; return false;
} }
state_ |= write_entered_; state_ |= write_entered_;
if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind( if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind(
&shared_mutex::no_readers, boost::ref(*this)))) &shared_mutex::no_readers, this)))
{ {
state_ &= ~write_entered_; state_ &= ~write_entered_;
return false; return false;
@@ -350,7 +350,7 @@ namespace boost {
inline void shared_mutex::lock_shared() inline void shared_mutex::lock_shared()
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
gate1_.wait(lk, boost::bind(&shared_mutex::no_writer_no_max_readers, boost::ref(*this))); gate1_.wait(lk, boost::bind(&shared_mutex::no_writer_no_max_readers, this));
count_t num_readers = (state_ & n_readers_) + 1; count_t num_readers = (state_ & n_readers_) + 1;
state_ &= ~n_readers_; state_ &= ~n_readers_;
state_ |= num_readers; state_ |= num_readers;
@@ -376,7 +376,7 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.wait_until(lk, abs_time, boost::bind( if (!gate1_.wait_until(lk, abs_time, boost::bind(
&shared_mutex::no_writer_no_max_readers, boost::ref(*this)))) &shared_mutex::no_writer_no_max_readers, this)))
{ {
return false; return false;
} }
@@ -393,7 +393,7 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind( if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
&shared_mutex::no_writer_no_max_readers, boost::ref(*this)))) &shared_mutex::no_writer_no_max_readers, this)))
{ {
return false; return false;
} }
@@ -653,9 +653,9 @@ namespace boost {
inline void upgrade_mutex::lock() inline void upgrade_mutex::lock()
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this))); gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader, this));
state_ |= write_entered_; state_ |= write_entered_;
gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, boost::ref(*this))); gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, this));
} }
inline bool upgrade_mutex::try_lock() inline bool upgrade_mutex::try_lock()
@@ -676,13 +676,13 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.wait_until(lk, abs_time, boost::bind( if (!gate1_.wait_until(lk, abs_time, boost::bind(
&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this)))) &upgrade_mutex::no_writer_no_upgrader, this)))
{ {
return false; return false;
} }
state_ |= write_entered_; state_ |= write_entered_;
if (!gate2_.wait_until(lk, abs_time, boost::bind( if (!gate2_.wait_until(lk, abs_time, boost::bind(
&upgrade_mutex::no_readers, boost::ref(*this)))) &upgrade_mutex::no_readers, this)))
{ {
state_ &= ~write_entered_; state_ &= ~write_entered_;
return false; return false;
@@ -697,13 +697,13 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind( if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this)))) &upgrade_mutex::no_writer_no_upgrader, this)))
{ {
return false; return false;
} }
state_ |= write_entered_; state_ |= write_entered_;
if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind( if (!gate2_.timed_wait(lk, abs_or_rel_time, boost::bind(
&upgrade_mutex::no_readers, boost::ref(*this)))) &upgrade_mutex::no_readers, this)))
{ {
state_ &= ~write_entered_; state_ &= ~write_entered_;
return false; return false;
@@ -729,7 +729,7 @@ namespace boost {
inline void upgrade_mutex::lock_shared() inline void upgrade_mutex::lock_shared()
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_max_readers, boost::ref(*this))); gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_max_readers, this));
count_t num_readers = (state_ & n_readers_) + 1; count_t num_readers = (state_ & n_readers_) + 1;
state_ &= ~n_readers_; state_ &= ~n_readers_;
state_ |= num_readers; state_ |= num_readers;
@@ -755,7 +755,7 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.wait_until(lk, abs_time, boost::bind( if (!gate1_.wait_until(lk, abs_time, boost::bind(
&upgrade_mutex::no_writer_no_max_readers, boost::ref(*this)))) &upgrade_mutex::no_writer_no_max_readers, this)))
{ {
return false; return false;
} }
@@ -772,7 +772,7 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind( if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
&upgrade_mutex::no_writer_no_max_readers, boost::ref(*this)))) &upgrade_mutex::no_writer_no_max_readers, this)))
{ {
return false; return false;
} }
@@ -807,7 +807,7 @@ namespace boost {
inline void upgrade_mutex::lock_upgrade() inline void upgrade_mutex::lock_upgrade()
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this))); gate1_.wait(lk, boost::bind(&upgrade_mutex::no_writer_no_upgrader_no_max_readers, this));
count_t num_readers = (state_ & n_readers_) + 1; count_t num_readers = (state_ & n_readers_) + 1;
state_ &= ~n_readers_; state_ &= ~n_readers_;
state_ |= upgradable_entered_ | num_readers; state_ |= upgradable_entered_ | num_readers;
@@ -833,7 +833,7 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.wait_until(lk, abs_time, boost::bind( if (!gate1_.wait_until(lk, abs_time, boost::bind(
&upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this)))) &upgrade_mutex::no_writer_no_upgrader_no_max_readers, this)))
{ {
return false; return false;
} }
@@ -850,7 +850,7 @@ namespace boost {
{ {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind( if (!gate1_.timed_wait(lk, abs_or_rel_time, boost::bind(
&upgrade_mutex::no_writer_no_upgrader_no_max_readers, boost::ref(*this)))) &upgrade_mutex::no_writer_no_upgrader_no_max_readers, this)))
{ {
return false; return false;
} }
@@ -898,7 +898,7 @@ namespace boost {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
BOOST_ASSERT(one_or_more_readers()); BOOST_ASSERT(one_or_more_readers());
if (!gate1_.wait_until(lk, abs_time, boost::bind( if (!gate1_.wait_until(lk, abs_time, boost::bind(
&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this)))) &upgrade_mutex::no_writer_no_upgrader, this)))
{ {
return false; return false;
} }
@@ -906,7 +906,7 @@ namespace boost {
state_ &= ~n_readers_; state_ &= ~n_readers_;
state_ |= (write_entered_ | num_readers); state_ |= (write_entered_ | num_readers);
if (!gate2_.wait_until(lk, abs_time, boost::bind( if (!gate2_.wait_until(lk, abs_time, boost::bind(
&upgrade_mutex::no_readers, boost::ref(*this)))) &upgrade_mutex::no_readers, this)))
{ {
++num_readers; ++num_readers;
state_ &= ~(write_entered_ | n_readers_); state_ &= ~(write_entered_ | n_readers_);
@@ -953,7 +953,7 @@ namespace boost {
boost::unique_lock<mutex_t> lk(mut_); boost::unique_lock<mutex_t> lk(mut_);
BOOST_ASSERT(one_or_more_readers()); BOOST_ASSERT(one_or_more_readers());
if (!gate1_.wait_until(lk, abs_time, boost::bind( if (!gate1_.wait_until(lk, abs_time, boost::bind(
&upgrade_mutex::no_writer_no_upgrader, boost::ref(*this)))) &upgrade_mutex::no_writer_no_upgrader, this)))
{ {
return false; return false;
} }
@@ -987,7 +987,7 @@ namespace boost {
count_t num_readers = (state_ & n_readers_) - 1; count_t num_readers = (state_ & n_readers_) - 1;
state_ &= ~(upgradable_entered_ | n_readers_); state_ &= ~(upgradable_entered_ | n_readers_);
state_ |= write_entered_ | num_readers; state_ |= write_entered_ | num_readers;
gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, boost::ref(*this))); gate2_.wait(lk, boost::bind(&upgrade_mutex::no_readers, this));
} }
inline bool upgrade_mutex::try_unlock_upgrade_and_lock() inline bool upgrade_mutex::try_unlock_upgrade_and_lock()
@@ -1017,7 +1017,7 @@ namespace boost {
state_ &= ~(upgradable_entered_ | n_readers_); state_ &= ~(upgradable_entered_ | n_readers_);
state_ |= (write_entered_ | num_readers); state_ |= (write_entered_ | num_readers);
if (!gate2_.wait_until(lk, abs_time, boost::bind( if (!gate2_.wait_until(lk, abs_time, boost::bind(
&upgrade_mutex::no_readers, boost::ref(*this)))) &upgrade_mutex::no_readers, this)))
{ {
++num_readers; ++num_readers;
state_ &= ~(write_entered_ | n_readers_); state_ &= ~(write_entered_ | n_readers_);

View File

@@ -22,7 +22,9 @@
#include <boost/thread/detail/move.hpp> #include <boost/thread/detail/move.hpp>
#include <boost/thread/detail/invoke.hpp> #include <boost/thread/detail/invoke.hpp>
#if !defined(BOOST_THREAD_PROVIDES_INVOKE) && !defined(BOOST_THREAD_PROVIDES_INVOKE_RET)
#include <boost/bind/bind.hpp> #include <boost/bind/bind.hpp>
#endif
#include <boost/config/abi_prefix.hpp> #include <boost/config/abi_prefix.hpp>
@@ -152,7 +154,7 @@ namespace boost
{ {
name_once_mutex(mutex_name,flag_address); name_once_mutex(mutex_name,flag_address);
} }
return ::boost::detail::win32::create_event( return ::boost::detail::win32::create_event(
mutex_name, mutex_name,
::boost::detail::win32::manual_reset_event, ::boost::detail::win32::manual_reset_event,

View File

@@ -11,8 +11,8 @@
#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp> #include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
#include <boost/assert.hpp> #include <boost/assert.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#include <boost/atomic.hpp>
#include <boost/memory_order.hpp> #include <boost/memory_order.hpp>
#include <boost/atomic/atomic.hpp>
#include <pthread.h> #include <pthread.h>
namespace boost namespace boost

View File

@@ -34,10 +34,10 @@
#include <mutex> #include <mutex>
#include <atomic> #include <atomic>
#include <Activation.h> #include <Activation.h>
#include <wrl\client.h> #include <wrl/client.h>
#include <wrl\event.h> #include <wrl/event.h>
#include <wrl\wrappers\corewrappers.h> #include <wrl/wrappers/corewrappers.h>
#include <wrl\ftm.h> #include <wrl/ftm.h>
#include <windows.system.threading.h> #include <windows.system.threading.h>
#pragma comment(lib, "runtimeobject.lib") #pragma comment(lib, "runtimeobject.lib")
#endif #endif
@@ -577,10 +577,18 @@ namespace boost
} Reason; } Reason;
} REASON_CONTEXT, *PREASON_CONTEXT; } REASON_CONTEXT, *PREASON_CONTEXT;
typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG); typedef BOOL (WINAPI *setwaitabletimerex_t)(HANDLE, const LARGE_INTEGER *, LONG, PTIMERAPCROUTINE, LPVOID, PREASON_CONTEXT, ULONG);
#ifdef _MSC_VER
#pragma warning(push)
#pragma warning(disable: 4100) // unreferenced formal parameter
#endif
static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay) static inline BOOL WINAPI SetWaitableTimerEx_emulation(HANDLE hTimer, const LARGE_INTEGER *lpDueTime, LONG lPeriod, PTIMERAPCROUTINE pfnCompletionRoutine, LPVOID lpArgToCompletionRoutine, PREASON_CONTEXT WakeContext, ULONG TolerableDelay)
{ {
return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine, lpArgToCompletionRoutine, FALSE); return SetWaitableTimer(hTimer, lpDueTime, lPeriod, pfnCompletionRoutine, lpArgToCompletionRoutine, FALSE);
} }
#ifdef _MSC_VER
#pragma warning(pop)
#endif
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(push) #pragma warning(push)
#pragma warning(disable: 6387) // MSVC sanitiser warns that GetModuleHandleA() might fail #pragma warning(disable: 6387) // MSVC sanitiser warns that GetModuleHandleA() might fail

View File

@@ -268,16 +268,15 @@ rule generate_self_contained_header_tests
if ! [ os.environ BOOST_THREAD_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ] if ! [ os.environ BOOST_THREAD_TEST_WITHOUT_SELF_CONTAINED_HEADER_TESTS ]
{ {
local headers_path = [ path.make $(BOOST_ROOT)/libs/thread/include/boost/thread ] ; for file in [ glob-tree-ex ../include/boost/thread : *.hpp : detail pthread win32 ]
for file in [ path.glob-tree $(headers_path) : *.hpp : detail pthread win32 ]
{ {
local rel_file = [ path.relative-to $(headers_path) $(file) ] ; local rel_file = [ path.relative-to ../include/boost/thread $(file) ] ;
# Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end. # Note: The test name starts with '~' in order to group these tests in the test report table, preferably at the end.
# All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes. # All '/' are replaced with '-' because apparently test scripts have a problem with test names containing slashes.
local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ; local test_name = [ regex.replace ~hdr/$(rel_file) "/" "-" ] ;
#ECHO $(rel_file) ; #ECHO $(rel_file) ;
all_rules += [ compile self_contained_header.cpp : <define>"BOOST_THREAD_TEST_HEADER=$(rel_file)" <dependency>$(file) : $(test_name) ] ; all_rules += [ compile self_contained_header.cpp : <define>"BOOST_THREAD_TEST_HEADER=$(rel_file)" <dependency>$(file) <use>../build//boost_thread : $(test_name) ] ;
all_rules += [ compile self_contained_header.cpp : <define>"BOOST_THREAD_TEST_HEADER=$(rel_file)" <define>"BOOST_THREAD_TEST_POST_WINDOWS_H" <dependency>$(file) <conditional>@windows-cygwin-specific : $(test_name)-post_winh ] ; all_rules += [ compile self_contained_header.cpp : <define>"BOOST_THREAD_TEST_HEADER=$(rel_file)" <define>"BOOST_THREAD_TEST_POST_WINDOWS_H" <dependency>$(file) <conditional>@windows-cygwin-specific <use>../build//boost_thread : $(test_name)-post_winh ] ;
} }
} }
@@ -1012,7 +1011,7 @@ rule generate_self_contained_header_tests
#[ thread-run test_10128.cpp ] #[ thread-run test_10128.cpp ]
#[ thread-run test_10340.cpp ] #[ thread-run test_10340.cpp ]
; ;
explicit ts_more_cpp11 ; explicit ts_more_cpp11 ;
test-suite ts_more_cpp11 test-suite ts_more_cpp11
: :
@@ -1033,13 +1032,13 @@ rule generate_self_contained_header_tests
: :
[ thread-run2-noit ./experimental/parallel/v1/exception_list_pass.cpp : exception_list_p ] [ thread-run2-noit ./experimental/parallel/v1/exception_list_pass.cpp : exception_list_p ]
; ;
#explicit ts_task_region ; #explicit ts_task_region ;
test-suite ts_task_region test-suite ts_task_region
: :
[ thread-run2-noit ./experimental/parallel/v2/task_region_pass.cpp : task_region_p ] [ thread-run2-noit ./experimental/parallel/v2/task_region_pass.cpp : task_region_p ]
; ;
explicit ts_other ; explicit ts_other ;
test-suite ts_other test-suite ts_other
: :
@@ -1050,7 +1049,7 @@ rule generate_self_contained_header_tests
explicit ts_ ; explicit ts_ ;
test-suite ts_ test-suite ts_
: :
#[ thread-run test_11256.cpp ] #[ thread-run test_11256.cpp ]
#[ thread-run test_11256.cpp ] #[ thread-run test_11256.cpp ]
#[ thread-run test_11499.cpp ] #[ thread-run test_11499.cpp ]
#[ thread-run test_11611.cpp ] #[ thread-run test_11611.cpp ]
@@ -1060,7 +1059,7 @@ rule generate_self_contained_header_tests
#[ thread-run test_12949.cpp ] #[ thread-run test_12949.cpp ]
#[ thread-run test_13480b.cpp ] #[ thread-run test_13480b.cpp ]
[ thread-run test_13561.cpp ] [ thread-run test_13561.cpp ]
; ;
explicit test_time_jumps_1_obj ; explicit test_time_jumps_1_obj ;

View File

@@ -14,7 +14,7 @@
#include <boost/thread/experimental/parallel/v1/exception_list.hpp> #include <boost/thread/experimental/parallel/v1/exception_list.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()

View File

@@ -16,7 +16,7 @@
#include <boost/thread/experimental/parallel/v2/task_region.hpp> #include <boost/thread/experimental/parallel/v2/task_region.hpp>
#include <string> #include <string>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if ! defined BOOST_NO_CXX11_LAMBDAS && defined(BOOST_THREAD_PROVIDES_INVOKE) #if ! defined BOOST_NO_CXX11_LAMBDAS && defined(BOOST_THREAD_PROVIDES_INVOKE)
using boost::experimental::parallel::v2::task_region; using boost::experimental::parallel::v2::task_region;

View File

@@ -15,7 +15,7 @@
// <boost/thread/detail/invoke.hpp> // <boost/thread/detail/invoke.hpp>
#include <boost/thread/detail/invoke.hpp> #include <boost/thread/detail/invoke.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int f() int f()
{ {

View File

@@ -16,7 +16,7 @@
// <boost/thread/detail/invoke.hpp> // <boost/thread/detail/invoke.hpp>
#include <boost/thread/detail/invoke.hpp> #include <boost/thread/detail/invoke.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int count = 0; int count = 0;

View File

@@ -15,7 +15,7 @@
// <boost/thread/detail/invoke.hpp> // <boost/thread/detail/invoke.hpp>
#include <boost/thread/detail/invoke.hpp> #include <boost/thread/detail/invoke.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int count = 0; int count = 0;

View File

@@ -15,7 +15,7 @@
// <boost/thread/detail/invoker.hpp> // <boost/thread/detail/invoker.hpp>
#include <boost/thread/detail/invoker.hpp> #include <boost/thread/detail/invoker.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int f() int f()
{ {

View File

@@ -15,7 +15,7 @@
// <boost/thread/detail/invoker.hpp> // <boost/thread/detail/invoker.hpp>
#include <boost/thread/detail/invoker.hpp> #include <boost/thread/detail/invoker.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int count = 0; int count = 0;

View File

@@ -19,7 +19,7 @@
#endif #endif
#include <boost/thread/detail/invoker.hpp> #include <boost/thread/detail/invoker.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int count = 0; int count = 0;

View File

@@ -18,7 +18,7 @@
// condition_variable(const condition_variable&) = delete; // condition_variable(const condition_variable&) = delete;
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
void fail() void fail()
{ {

View File

@@ -18,7 +18,7 @@
// condition_variable(const condition_variable&) = delete; // condition_variable(const condition_variable&) = delete;
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -21,7 +21,7 @@
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/thread/locks.hpp> #include <boost/thread/locks.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
boost::condition_variable* cv; boost::condition_variable* cv;
boost::mutex m; boost::mutex m;

View File

@@ -21,7 +21,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <cassert> #include <cassert>
// Summary of each test: // Summary of each test:

View File

@@ -20,7 +20,8 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/type_traits/is_same.hpp>
#include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -21,7 +21,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <cassert> #include <cassert>
#include "../../../timming.hpp" #include "../../../timming.hpp"

View File

@@ -20,7 +20,8 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>
#include "../../../timming.hpp" #include "../../../timming.hpp"
@@ -64,9 +65,9 @@ void f()
assert(test2 == 0); assert(test2 == 0);
test1 = 1; test1 = 1;
cv.notify_one(); cv.notify_one();
Clock::time_point t0 = Clock::now(); BOOST_ATTRIBUTE_UNUSED Clock::time_point t0 = Clock::now();
cv.wait_for(lk, milliseconds(250), Pred(test2)); cv.wait_for(lk, milliseconds(250), Pred(test2));
Clock::time_point t1 = Clock::now(); BOOST_ATTRIBUTE_UNUSED Clock::time_point t1 = Clock::now();
if (runs == 0) if (runs == 0)
{ {
assert(t1 - t0 < max_diff); assert(t1 - t0 < max_diff);

View File

@@ -21,7 +21,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>

View File

@@ -20,7 +20,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <iostream> #include <iostream>
#include <cassert> #include <cassert>
#include "../../../timming.hpp" #include "../../../timming.hpp"

View File

@@ -20,7 +20,8 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/config.hpp>
#include <cassert> #include <cassert>
#include <iostream> #include <iostream>
#include "../../../timming.hpp" #include "../../../timming.hpp"
@@ -79,7 +80,7 @@ void f()
cv.notify_one(); cv.notify_one();
Clock::time_point t0 = Clock::now(); Clock::time_point t0 = Clock::now();
Clock::time_point t = t0 + Clock::duration(250); Clock::time_point t = t0 + Clock::duration(250);
bool r = cv.wait_until(lk, t, Pred(test2)); BOOST_ATTRIBUTE_UNUSED bool r = cv.wait_until(lk, t, Pred(test2));
Clock::time_point t1 = Clock::now(); Clock::time_point t1 = Clock::now();
if (runs == 0) if (runs == 0)
{ {

View File

@@ -18,7 +18,7 @@
// condition_variable_any(const condition_variable_any&) = delete; // condition_variable_any(const condition_variable_any&) = delete;
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
void fail() void fail()
{ {

View File

@@ -18,7 +18,7 @@
// condition_variable_any(const condition_variable_any&) = delete; // condition_variable_any(const condition_variable_any&) = delete;
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -21,7 +21,7 @@
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/thread/locks.hpp> #include <boost/thread/locks.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
boost::condition_variable_any* cv; boost::condition_variable_any* cv;
boost::timed_mutex m; boost::timed_mutex m;

View File

@@ -21,7 +21,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <cassert> #include <cassert>
// Summary of each test: // Summary of each test:

View File

@@ -20,7 +20,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include "../../../timming.hpp" #include "../../../timming.hpp"
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -20,7 +20,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include "../../../timming.hpp" #include "../../../timming.hpp"
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -20,7 +20,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include "../../../timming.hpp" #include "../../../timming.hpp"
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -20,7 +20,7 @@
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp> #include <boost/thread/mutex.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include "../../../timming.hpp" #include "../../../timming.hpp"
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -18,7 +18,7 @@
// static unsigned hardware_concurrency(); // static unsigned hardware_concurrency();
#include <boost/thread/condition_variable.hpp> #include <boost/thread/condition_variable.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -23,7 +23,7 @@
#include <boost/thread/locks.hpp> #include <boost/thread/locks.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/chrono/chrono.hpp> #include <boost/chrono/chrono.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
boost::condition_variable cv; boost::condition_variable cv;
boost::mutex mut; boost::mutex mut;

View File

@@ -29,7 +29,7 @@
#include <boost/thread/detail/memory.hpp> #include <boost/thread/detail/memory.hpp>
#include <boost/thread/csbl/memory/unique_ptr.hpp> #include <boost/thread/csbl/memory/unique_ptr.hpp>
#include <memory> #include <memory>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/thread/executors/basic_thread_pool.hpp> #include <boost/thread/executors/basic_thread_pool.hpp>
#include <boost/thread/executor.hpp> #include <boost/thread/executor.hpp>

View File

@@ -34,7 +34,7 @@
#include <boost/thread/detail/memory.hpp> #include <boost/thread/detail/memory.hpp>
#include <boost/thread/csbl/memory/unique_ptr.hpp> #include <boost/thread/csbl/memory/unique_ptr.hpp>
#include <memory> #include <memory>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
typedef boost::chrono::high_resolution_clock Clock; typedef boost::chrono::high_resolution_clock Clock;
typedef boost::chrono::milliseconds ms; typedef boost::chrono::milliseconds ms;

View File

@@ -16,7 +16,7 @@
#include <boost/thread/detail/log.hpp> #include <boost/thread/detail/log.hpp>
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD) #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION && defined(BOOST_THREAD_PROVIDES_VARIADIC_THREAD)

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -20,7 +20,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -22,7 +22,7 @@
#include <boost/exception/exception.hpp> #include <boost/exception/exception.hpp>
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include "../test_allocator.hpp" #include "../test_allocator.hpp"
#endif #endif

View File

@@ -18,7 +18,7 @@
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/core/ref.hpp> #include <boost/core/ref.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -28,7 +28,7 @@
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
boost::mutex m0; boost::mutex m0;
boost::mutex m1; boost::mutex m1;

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
boost::mutex m; boost::mutex m;

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -16,7 +16,7 @@
#include <boost/thread/detail/log.hpp> #include <boost/thread/detail/log.hpp>
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <cassert> #include <cassert>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION

View File

@@ -18,7 +18,7 @@
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/thread/executors/basic_thread_pool.hpp> #include <boost/thread/executors/basic_thread_pool.hpp>
#include <boost/thread/executor.hpp> #include <boost/thread/executor.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <cassert> #include <cassert>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION

View File

@@ -16,7 +16,7 @@
#include <boost/thread/detail/log.hpp> #include <boost/thread/detail/log.hpp>
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION #if defined BOOST_THREAD_PROVIDES_FUTURE_CONTINUATION

View File

@@ -29,7 +29,7 @@
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/chrono/chrono_io.hpp> #include <boost/chrono/chrono_io.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -28,7 +28,7 @@
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/chrono/chrono_io.hpp> #include <boost/chrono/chrono_io.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -29,7 +29,7 @@
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/chrono/chrono_io.hpp> #include <boost/chrono/chrono_io.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include "../../../timming.hpp" #include "../../../timming.hpp"
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -29,7 +29,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
struct A struct A

View File

@@ -29,7 +29,7 @@
#include <boost/thread/detail/config.hpp> #include <boost/thread/detail/config.hpp>
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS

View File

@@ -26,7 +26,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class A class A
{ {

View File

@@ -26,7 +26,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class A class A
{ {

View File

@@ -26,7 +26,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <string> #include <string>
int main() int main()

View File

@@ -24,7 +24,7 @@
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/thread/thread.hpp> #include <boost/thread/thread.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if BOOST_THREAD_VERSION == 4 #if BOOST_THREAD_VERSION == 4
#define BOOST_THREAD_DETAIL_SIGNATURE double() #define BOOST_THREAD_DETAIL_SIGNATURE double()

View File

@@ -22,7 +22,7 @@
#define BOOST_THREAD_VERSION 4 #define BOOST_THREAD_VERSION 4
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if BOOST_THREAD_VERSION == 4 #if BOOST_THREAD_VERSION == 4
#define BOOST_THREAD_DETAIL_SIGNATURE double() #define BOOST_THREAD_DETAIL_SIGNATURE double()

View File

@@ -27,7 +27,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class A class A
{ {

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 4 #define BOOST_THREAD_VERSION 4
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_USES_CHRONO && \ #if defined BOOST_THREAD_USES_CHRONO && \
defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && \ defined BOOST_THREAD_PROVIDES_SIGNATURE_PACKAGED_TASK && \

View File

@@ -26,7 +26,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class A class A
{ {

View File

@@ -26,7 +26,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class A class A
{ {

View File

@@ -26,7 +26,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class A class A
{ {

View File

@@ -26,7 +26,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class A class A
{ {

View File

@@ -22,7 +22,7 @@
#define BOOST_THREAD_VERSION 4 #define BOOST_THREAD_VERSION 4
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_USES_CHRONO #if defined BOOST_THREAD_USES_CHRONO

View File

@@ -26,7 +26,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
class A class A
{ {

View File

@@ -23,7 +23,8 @@
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/type_traits/is_same.hpp>
#include <boost/core/lightweight_test.hpp>
struct A {}; struct A {};

View File

@@ -29,7 +29,7 @@
#endif #endif
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include "../test_allocator.hpp" #include "../test_allocator.hpp"

View File

@@ -18,7 +18,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -18,7 +18,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -22,7 +22,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
struct A struct A

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
int main() int main()
{ {

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include "../test_allocator.hpp" #include "../test_allocator.hpp"
#endif #endif

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS #if defined BOOST_THREAD_PROVIDES_FUTURE_CTOR_ALLOCATORS
#include "../test_allocator.hpp" #include "../test_allocator.hpp"
#endif #endif

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 4 #define BOOST_THREAD_VERSION 4
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
template <typename T> template <typename T>

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
template <typename T> template <typename T>

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 4 #define BOOST_THREAD_VERSION 4
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <memory> #include <memory>
int i = 0; int i = 0;

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
int main() int main()

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/thread/detail/memory.hpp> #include <boost/thread/detail/memory.hpp>
#include <boost/thread/csbl/memory/unique_ptr.hpp> #include <boost/thread/csbl/memory/unique_ptr.hpp>

View File

@@ -21,7 +21,7 @@
#define BOOST_THREAD_VERSION 3 #define BOOST_THREAD_VERSION 3
#include <boost/thread/future.hpp> #include <boost/thread/future.hpp>
#include <boost/detail/lightweight_test.hpp> #include <boost/core/lightweight_test.hpp>
#include <boost/static_assert.hpp> #include <boost/static_assert.hpp>
struct A struct A

Some files were not shown because too many files have changed in this diff Show More