Mercurial > hg > vamp-build-and-test
comparison DEPENDENCIES/generic/include/boost/thread/pthread/once.hpp @ 101:c530137014c0
Update Boost headers (1.58.0)
author | Chris Cannam |
---|---|
date | Mon, 07 Sep 2015 11:12:49 +0100 |
parents | 2665513ce2d3 |
children |
comparison
equal
deleted
inserted
replaced
100:793467b5e61c | 101:c530137014c0 |
---|---|
14 #include <boost/thread/detail/move.hpp> | 14 #include <boost/thread/detail/move.hpp> |
15 #include <boost/thread/detail/invoke.hpp> | 15 #include <boost/thread/detail/invoke.hpp> |
16 | 16 |
17 #include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp> | 17 #include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp> |
18 #include <boost/thread/detail/delete.hpp> | 18 #include <boost/thread/detail/delete.hpp> |
19 #include <boost/detail/no_exceptions_support.hpp> | 19 #include <boost/core/no_exceptions_support.hpp> |
20 | 20 |
21 #include <boost/bind.hpp> | 21 #include <boost/bind.hpp> |
22 #include <boost/assert.hpp> | 22 #include <boost/assert.hpp> |
23 #include <boost/config/abi_prefix.hpp> | 23 #include <boost/config/abi_prefix.hpp> |
24 | 24 |
40 #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(~0) | 40 #define BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_MAX_C BOOST_THREAD_DETAIL_UINTMAX_ATOMIC_C2(~0) |
41 | 41 |
42 } | 42 } |
43 | 43 |
44 #ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11 | 44 #ifdef BOOST_THREAD_PROVIDES_ONCE_CXX11 |
45 #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES | 45 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) |
46 template<typename Function, class ...ArgTypes> | 46 template<typename Function, class ...ArgTypes> |
47 inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args); | 47 inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args); |
48 #else | 48 #else |
49 template<typename Function> | 49 template<typename Function> |
50 inline void call_once(once_flag& flag, Function f); | 50 inline void call_once(once_flag& flag, Function f); |
63 : epoch(BOOST_ONCE_INITIAL_FLAG_VALUE) | 63 : epoch(BOOST_ONCE_INITIAL_FLAG_VALUE) |
64 {} | 64 {} |
65 private: | 65 private: |
66 volatile thread_detail::uintmax_atomic_t epoch; | 66 volatile thread_detail::uintmax_atomic_t epoch; |
67 | 67 |
68 #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES | 68 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) |
69 template<typename Function, class ...ArgTypes> | 69 template<typename Function, class ...ArgTypes> |
70 friend void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args); | 70 friend void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args); |
71 #else | 71 #else |
72 template<typename Function> | 72 template<typename Function> |
73 friend void call_once(once_flag& flag, Function f); | 73 friend void call_once(once_flag& flag, Function f); |
116 | 116 |
117 // Based on Mike Burrows fast_pthread_once algorithm as described in | 117 // Based on Mike Burrows fast_pthread_once algorithm as described in |
118 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html | 118 // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2444.html |
119 | 119 |
120 | 120 |
121 #ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES | 121 #if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) |
122 | 122 |
123 | 123 |
124 template<typename Function, class ...ArgTypes> | 124 template<typename Function, class ...ArgTypes> |
125 inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args) | 125 inline void call_once(once_flag& flag, BOOST_THREAD_RV_REF(Function) f, BOOST_THREAD_RV_REF(ArgTypes)... args) |
126 { | 126 { |