Mercurial > hg > vamp-build-and-test
diff DEPENDENCIES/generic/include/boost/thread/pthread/thread_data.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
line wrap: on
line diff
--- a/DEPENDENCIES/generic/include/boost/thread/pthread/thread_data.hpp Fri Sep 04 12:01:02 2015 +0100 +++ b/DEPENDENCIES/generic/include/boost/thread/pthread/thread_data.hpp Mon Sep 07 11:12:49 2015 +0100 @@ -15,7 +15,6 @@ #include <boost/shared_ptr.hpp> #include <boost/enable_shared_from_this.hpp> -#include <boost/optional.hpp> #include <boost/assert.hpp> #ifdef BOOST_THREAD_USES_CHRONO #include <boost/chrono/system_clocks.hpp> @@ -26,7 +25,9 @@ #include <utility> #if defined(__ANDROID__) -#include <asm/page.h> // http://code.google.com/p/android/issues/detail?id=39983 +# ifndef PAGE_SIZE +# define PAGE_SIZE 4096 +# endif #endif #include <pthread.h> @@ -114,8 +115,13 @@ boost::detail::thread_exit_callback_node* thread_exit_callbacks; std::map<void const*,boost::detail::tss_data_node> tss_data; +//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS + // These data must be at the end so that the access to the other fields doesn't change + // when BOOST_THREAD_PROVIDES_INTERRUPTIONS is defined. + // Another option is to have them always pthread_mutex_t* cond_mutex; pthread_cond_t* current_cond; +//#endif typedef std::vector<std::pair<condition_variable*, mutex*> //, hidden_allocator<std::pair<condition_variable*, mutex*> > > notify_list_t; @@ -135,8 +141,10 @@ thread_handle(0), done(false),join_started(false),joined(false), thread_exit_callbacks(0), +//#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS cond_mutex(0), current_cond(0), +//#endif notify(), async_states_() //#if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS @@ -220,11 +228,11 @@ namespace this_thread { - namespace hiden - { - void BOOST_THREAD_DECL sleep_for(const timespec& ts); - void BOOST_THREAD_DECL sleep_until(const timespec& ts); - } + namespace hiden + { + void BOOST_THREAD_DECL sleep_for(const timespec& ts); + void BOOST_THREAD_DECL sleep_until(const timespec& ts); + } #ifdef BOOST_THREAD_USES_CHRONO #ifdef BOOST_THREAD_SLEEP_FOR_IS_STEADY @@ -237,6 +245,27 @@ #endif #endif // BOOST_THREAD_USES_CHRONO + namespace no_interruption_point + { + namespace hiden + { + void BOOST_THREAD_DECL sleep_for(const timespec& ts); + void BOOST_THREAD_DECL sleep_until(const timespec& ts); + } + + #ifdef BOOST_THREAD_USES_CHRONO + #ifdef BOOST_THREAD_SLEEP_FOR_IS_STEADY + + inline + void BOOST_SYMBOL_VISIBLE sleep_for(const chrono::nanoseconds& ns) + { + return boost::this_thread::no_interruption_point::hiden::sleep_for(boost::detail::to_timespec(ns)); + } + #endif + #endif // BOOST_THREAD_USES_CHRONO + + } // no_interruption_point + void BOOST_THREAD_DECL yield() BOOST_NOEXCEPT; #if defined BOOST_THREAD_USES_DATETIME