aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/restricted
diff options
context:
space:
mode:
authorrobot-contrib <robot-contrib@yandex-team.com>2023-12-18 01:32:19 +0300
committerrobot-contrib <robot-contrib@yandex-team.com>2023-12-18 03:04:43 +0300
commitb0192c91dee7364dc264ed5cd4e161089e7a1728 (patch)
treed76e29e512b00c76ec8ae4e029f458954b0ebf51 /contrib/restricted
parent073a21157036d680796e0b04d5e1ab4153ac0940 (diff)
downloadydb-b0192c91dee7364dc264ed5cd4e161089e7a1728.tar.gz
Update contrib/restricted/boost/thread to 1.84.0
Diffstat (limited to 'contrib/restricted')
-rw-r--r--contrib/restricted/boost/thread/CMakeLists.darwin-arm64.txt4
-rw-r--r--contrib/restricted/boost/thread/CMakeLists.darwin-x86_64.txt4
-rw-r--r--contrib/restricted/boost/thread/CMakeLists.linux-aarch64.txt4
-rw-r--r--contrib/restricted/boost/thread/CMakeLists.linux-x86_64.txt4
-rw-r--r--contrib/restricted/boost/thread/CMakeLists.windows-x86_64.txt4
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/functional.hpp15
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_arg.hpp14
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_traits.hpp11
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/config.hpp2
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/pointer_traits.hpp11
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/scoped_allocator.hpp11
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/shared_ptr.hpp19
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/memory/unique_ptr.hpp10
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/tuple.hpp19
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/csbl/vector.hpp15
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/invoke.hpp15
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/string_to_unsigned.hpp55
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/detail/string_trim.hpp29
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/future.hpp1
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_any.hpp5
-rw-r--r--contrib/restricted/boost/thread/include/boost/thread/win32/basic_timed_mutex.hpp14
-rw-r--r--contrib/restricted/boost/thread/src/pthread/thread.cpp38
-rw-r--r--contrib/restricted/boost/thread/ya.make8
23 files changed, 140 insertions, 172 deletions
diff --git a/contrib/restricted/boost/thread/CMakeLists.darwin-arm64.txt b/contrib/restricted/boost/thread/CMakeLists.darwin-arm64.txt
index 683da25426..6f73c738f5 100644
--- a/contrib/restricted/boost/thread/CMakeLists.darwin-arm64.txt
+++ b/contrib/restricted/boost/thread/CMakeLists.darwin-arm64.txt
@@ -22,7 +22,6 @@ target_include_directories(restricted-boost-thread PUBLIC
)
target_link_libraries(restricted-boost-thread PUBLIC
contrib-libs-cxxsupp
- restricted-boost-algorithm
restricted-boost-assert
restricted-boost-atomic
restricted-boost-bind
@@ -35,10 +34,7 @@ target_link_libraries(restricted-boost-thread PUBLIC
restricted-boost-date_time
restricted-boost-exception
restricted-boost-function
- restricted-boost-intrusive
restricted-boost-io
- restricted-boost-iterator
- restricted-boost-lexical_cast
restricted-boost-move
restricted-boost-optional
restricted-boost-predef
diff --git a/contrib/restricted/boost/thread/CMakeLists.darwin-x86_64.txt b/contrib/restricted/boost/thread/CMakeLists.darwin-x86_64.txt
index 683da25426..6f73c738f5 100644
--- a/contrib/restricted/boost/thread/CMakeLists.darwin-x86_64.txt
+++ b/contrib/restricted/boost/thread/CMakeLists.darwin-x86_64.txt
@@ -22,7 +22,6 @@ target_include_directories(restricted-boost-thread PUBLIC
)
target_link_libraries(restricted-boost-thread PUBLIC
contrib-libs-cxxsupp
- restricted-boost-algorithm
restricted-boost-assert
restricted-boost-atomic
restricted-boost-bind
@@ -35,10 +34,7 @@ target_link_libraries(restricted-boost-thread PUBLIC
restricted-boost-date_time
restricted-boost-exception
restricted-boost-function
- restricted-boost-intrusive
restricted-boost-io
- restricted-boost-iterator
- restricted-boost-lexical_cast
restricted-boost-move
restricted-boost-optional
restricted-boost-predef
diff --git a/contrib/restricted/boost/thread/CMakeLists.linux-aarch64.txt b/contrib/restricted/boost/thread/CMakeLists.linux-aarch64.txt
index ee0e2e1fcc..c4a00092a1 100644
--- a/contrib/restricted/boost/thread/CMakeLists.linux-aarch64.txt
+++ b/contrib/restricted/boost/thread/CMakeLists.linux-aarch64.txt
@@ -23,7 +23,6 @@ target_include_directories(restricted-boost-thread PUBLIC
target_link_libraries(restricted-boost-thread PUBLIC
contrib-libs-linux-headers
contrib-libs-cxxsupp
- restricted-boost-algorithm
restricted-boost-assert
restricted-boost-atomic
restricted-boost-bind
@@ -36,10 +35,7 @@ target_link_libraries(restricted-boost-thread PUBLIC
restricted-boost-date_time
restricted-boost-exception
restricted-boost-function
- restricted-boost-intrusive
restricted-boost-io
- restricted-boost-iterator
- restricted-boost-lexical_cast
restricted-boost-move
restricted-boost-optional
restricted-boost-predef
diff --git a/contrib/restricted/boost/thread/CMakeLists.linux-x86_64.txt b/contrib/restricted/boost/thread/CMakeLists.linux-x86_64.txt
index ee0e2e1fcc..c4a00092a1 100644
--- a/contrib/restricted/boost/thread/CMakeLists.linux-x86_64.txt
+++ b/contrib/restricted/boost/thread/CMakeLists.linux-x86_64.txt
@@ -23,7 +23,6 @@ target_include_directories(restricted-boost-thread PUBLIC
target_link_libraries(restricted-boost-thread PUBLIC
contrib-libs-linux-headers
contrib-libs-cxxsupp
- restricted-boost-algorithm
restricted-boost-assert
restricted-boost-atomic
restricted-boost-bind
@@ -36,10 +35,7 @@ target_link_libraries(restricted-boost-thread PUBLIC
restricted-boost-date_time
restricted-boost-exception
restricted-boost-function
- restricted-boost-intrusive
restricted-boost-io
- restricted-boost-iterator
- restricted-boost-lexical_cast
restricted-boost-move
restricted-boost-optional
restricted-boost-predef
diff --git a/contrib/restricted/boost/thread/CMakeLists.windows-x86_64.txt b/contrib/restricted/boost/thread/CMakeLists.windows-x86_64.txt
index d87e00879f..366022e4bf 100644
--- a/contrib/restricted/boost/thread/CMakeLists.windows-x86_64.txt
+++ b/contrib/restricted/boost/thread/CMakeLists.windows-x86_64.txt
@@ -24,7 +24,6 @@ target_include_directories(restricted-boost-thread PUBLIC
)
target_link_libraries(restricted-boost-thread PUBLIC
contrib-libs-cxxsupp
- restricted-boost-algorithm
restricted-boost-assert
restricted-boost-atomic
restricted-boost-bind
@@ -37,10 +36,7 @@ target_link_libraries(restricted-boost-thread PUBLIC
restricted-boost-date_time
restricted-boost-exception
restricted-boost-function
- restricted-boost-intrusive
restricted-boost-io
- restricted-boost-iterator
- restricted-boost-lexical_cast
restricted-boost-move
restricted-boost-optional
restricted-boost-predef
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/functional.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/functional.hpp
index 7a7e928b70..0fc339a245 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/functional.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/functional.hpp
@@ -9,24 +9,12 @@
#ifndef BOOST_CSBL_FUNCTIONAL_HPP
#define BOOST_CSBL_FUNCTIONAL_HPP
-#include <boost/config.hpp>
-
#include <functional>
-#if defined BOOST_THREAD_USES_BOOST_FUNCTIONAL || defined BOOST_NO_CXX11_HDR_FUNCTIONAL || defined BOOST_NO_CXX11_RVALUE_REFERENCES
-#ifndef BOOST_THREAD_USES_BOOST_FUNCTIONAL
-#define BOOST_THREAD_USES_BOOST_FUNCTIONAL
-#endif
-#include <boost/function.hpp>
-#endif
-
namespace boost
{
namespace csbl
{
-#if defined BOOST_THREAD_USES_BOOST_FUNCTIONAL
- using ::boost::function;
-#else
// D.8.1, base (deprecated):
// 20.9.3, reference_wrapper:
// 20.9.4, arithmetic operations:
@@ -42,8 +30,7 @@ namespace boost
// 20.9.11 polymorphic function wrappers:
using ::std::function;
// 20.9.12, hash function primary template:
-#endif
-
}
}
+
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_arg.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_arg.hpp
index 354cdaee88..d63bf87984 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_arg.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_arg.hpp
@@ -12,30 +12,20 @@
#include <boost/thread/csbl/memory/config.hpp>
// 20.7.6, allocator argument tag
-#if defined BOOST_NO_CXX11_ALLOCATOR
-#include <boost/container/scoped_allocator.hpp>
namespace boost
{
namespace csbl
{
- using ::boost::container::allocator_arg_t;
- using ::boost::container::allocator_arg;
- }
-}
-#else
-namespace boost
-{
- namespace csbl
- {
using ::std::allocator_arg_t;
using ::std::allocator_arg;
}
}
-#endif // BOOST_NO_CXX11_ALLOCATOR
+
namespace boost
{
using ::boost::csbl::allocator_arg_t;
using ::boost::csbl::allocator_arg;
}
+
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_traits.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_traits.hpp
index 3737cd85de..4ea160dce0 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_traits.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/allocator_traits.hpp
@@ -12,24 +12,13 @@
#include <boost/thread/csbl/memory/config.hpp>
// 20.7.8, allocator traits
-#if defined BOOST_NO_CXX11_ALLOCATOR
-#include <boost/container/allocator_traits.hpp>
namespace boost
{
namespace csbl
{
- using ::boost::container::allocator_traits;
- }
-}
-#else
-namespace boost
-{
- namespace csbl
- {
using ::std::allocator_traits;
}
}
-#endif // BOOST_NO_CXX11_POINTER_TRAITS
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/config.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/config.hpp
index 7b0596ac49..7f6ec60303 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/config.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/config.hpp
@@ -9,8 +9,6 @@
#ifndef BOOST_CSBL_MEMORY_CONFIG_HPP
#define BOOST_CSBL_MEMORY_CONFIG_HPP
-#include <boost/config.hpp>
-
#include <memory>
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/pointer_traits.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/pointer_traits.hpp
index 320f8e9e77..7956967a51 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/pointer_traits.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/pointer_traits.hpp
@@ -12,24 +12,13 @@
#include <boost/thread/csbl/memory/config.hpp>
// 20.7.3, pointer traits
-#if defined BOOST_NO_CXX11_ALLOCATOR
-#include <boost/intrusive/pointer_traits.hpp>
namespace boost
{
namespace csbl
{
- using ::boost::intrusive::pointer_traits;
- }
-}
-#else
-namespace boost
-{
- namespace csbl
- {
using ::std::pointer_traits;
}
}
-#endif // BOOST_NO_CXX11_ALLOCATOR
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/scoped_allocator.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/scoped_allocator.hpp
index a92f3d8514..5f4da9a492 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/scoped_allocator.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/scoped_allocator.hpp
@@ -12,24 +12,13 @@
#include <boost/thread/csbl/memory/config.hpp>
// 20.7.7, uses_allocator
-#if defined BOOST_NO_CXX11_ALLOCATOR
-#include <boost/container/scoped_allocator.hpp>
namespace boost
{
namespace csbl
{
- using ::boost::container::uses_allocator;
- }
-}
-#else
-namespace boost
-{
- namespace csbl
- {
using ::std::uses_allocator;
}
}
-#endif // BOOST_NO_CXX11_POINTER_TRAITS
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/shared_ptr.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/shared_ptr.hpp
index e9a9383723..7e136cf33f 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/shared_ptr.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/shared_ptr.hpp
@@ -11,24 +11,6 @@
#include <boost/thread/csbl/memory/config.hpp>
-#if defined BOOST_NO_CXX11_SMART_PTR
-
-#include <boost/smart_ptr/shared_ptr.hpp>
-#include <boost/smart_ptr/make_shared.hpp>
-
-namespace boost
-{
- namespace csbl
- {
- using ::boost::shared_ptr;
- using ::boost::make_shared;
- }
-}
-
-#else
-
-#include <boost/shared_ptr.hpp>
-
namespace boost
{
namespace csbl
@@ -38,5 +20,4 @@ namespace boost
}
}
-#endif
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/unique_ptr.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/unique_ptr.hpp
index 17abf54e92..220c2f4dc1 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/unique_ptr.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/memory/unique_ptr.hpp
@@ -12,17 +12,15 @@
#define BOOST_CSBL_MEMORY_UNIQUE_PTR_HPP
#include <boost/thread/csbl/memory/config.hpp>
-
-#include <boost/move/unique_ptr.hpp>
-#include <boost/move/make_unique.hpp>
+#include <boost/smart_ptr/make_unique.hpp>
namespace boost
{
namespace csbl
{
- using ::boost::movelib::unique_ptr;
- using ::boost::movelib::make_unique;
-
+ using ::std::unique_ptr;
+ using ::boost::make_unique;
}
}
+
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/tuple.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/tuple.hpp
index 860229ebe0..45d6dbd453 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/tuple.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/tuple.hpp
@@ -9,28 +9,12 @@
#ifndef BOOST_CSBL_TUPLE_HPP
#define BOOST_CSBL_TUPLE_HPP
-#include <boost/config.hpp>
-
-#if defined BOOST_THREAD_USES_BOOST_TUPLE || defined BOOST_NO_CXX11_HDR_TUPLE || defined BOOST_NO_CXX11_RVALUE_REFERENCES
-#include <boost/tuple/tuple.hpp>
-#ifndef BOOST_THREAD_USES_BOOST_TUPLE
-#define BOOST_THREAD_USES_BOOST_TUPLE
-#endif
-
-#else
#include <tuple>
-#endif
namespace boost
{
namespace csbl
{
-#if defined BOOST_THREAD_USES_BOOST_TUPLE
- using ::boost::tuple;
- using ::boost::get;
- using ::boost::make_tuple;
- //using ::boost::tuple_size;
-#else
// 20.4.2, class template tuple:
using ::std::tuple;
using ::std::get;
@@ -42,8 +26,7 @@ namespace boost
// 20.4.2.7, relational operators:
// 20.4.2.8, allocator-related traits
// 20.4.2.9, specialized algorithms:
-#endif
-
}
}
+
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/csbl/vector.hpp b/contrib/restricted/boost/thread/include/boost/thread/csbl/vector.hpp
index c77a5b143b..5f06f81d70 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/csbl/vector.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/csbl/vector.hpp
@@ -9,27 +9,14 @@
#ifndef BOOST_CSBL_VECTOR_HPP
#define BOOST_CSBL_VECTOR_HPP
-#include <boost/config.hpp>
-
-#if defined BOOST_THREAD_USES_BOOST_VECTOR || defined BOOST_NO_CXX11_RVALUE_REFERENCES || defined BOOST_MSVC
-#ifndef BOOST_THREAD_USES_BOOST_VECTOR
-#define BOOST_THREAD_USES_BOOST_VECTOR
-#endif
-#include <boost/container/vector.hpp>
-#else
#include <vector>
-#endif
namespace boost
{
namespace csbl
{
-#if defined BOOST_THREAD_USES_BOOST_VECTOR
- using ::boost::container::vector;
-#else
using ::std::vector;
-#endif
-
}
}
+
#endif // header
diff --git a/contrib/restricted/boost/thread/include/boost/thread/detail/invoke.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/invoke.hpp
index b9da4afb91..ae4dd89cc6 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/detail/invoke.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/invoke.hpp
@@ -32,6 +32,7 @@
#include <boost/type_traits/is_base_of.hpp>
#include <boost/type_traits/is_pointer.hpp>
#include <boost/type_traits/is_member_function_pointer.hpp>
+#include <boost/type_traits/is_member_object_pointer.hpp>
#include <boost/type_traits/remove_reference.hpp>
#ifndef BOOST_NO_CXX11_HDR_FUNCTIONAL
#include <functional>
@@ -85,7 +86,13 @@ namespace boost
// bullets 3 and 4
- template <class Fp, class A0>
+ // enable_if avoids
+ //
+ // ./boost/thread/detail/invoke.hpp:101:43: internal compiler error: in gimplify_expr, at gimplify.c:12039
+ // https://sourceforge.net/p/mingw-w64/bugs/694/
+ // https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83756
+
+ template <class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
inline auto
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
-> decltype(boost::forward<A0>(a0).*f)
@@ -93,7 +100,7 @@ namespace boost
return boost::forward<A0>(a0).*f;
}
- template <class Fp, class A0>
+ template <class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
inline auto
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
-> decltype((*boost::forward<A0>(a0)).*f)
@@ -101,7 +108,7 @@ namespace boost
return (*boost::forward<A0>(a0)).*f;
}
- template <class R, class Fp, class A0>
+ template <class R, class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
inline auto
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
-> decltype(boost::forward<A0>(a0).*f)
@@ -109,7 +116,7 @@ namespace boost
return boost::forward<A0>(a0).*f;
}
- template <class R, class Fp, class A0>
+ template <class R, class Fp, class A0, class En = typename boost::enable_if<boost::is_member_object_pointer<Fp> >::type>
inline auto
invoke(BOOST_THREAD_RV_REF(Fp) f, BOOST_THREAD_RV_REF(A0) a0)
-> decltype((*boost::forward<A0>(a0)).*f)
diff --git a/contrib/restricted/boost/thread/include/boost/thread/detail/string_to_unsigned.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/string_to_unsigned.hpp
new file mode 100644
index 0000000000..9e58aabb31
--- /dev/null
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/string_to_unsigned.hpp
@@ -0,0 +1,55 @@
+#ifndef BOOST_THREAD_DETAIL_STRING_TO_UNSIGNED_HPP_INCLUDED
+#define BOOST_THREAD_DETAIL_STRING_TO_UNSIGNED_HPP_INCLUDED
+
+// Copyright 2023 Peter Dimov
+// Distributed under the Boost Software License, Version 1.0.
+// https://www.boost.org/LICENSE_1_0.txt
+
+#include <string>
+#include <climits>
+
+namespace boost
+{
+namespace thread_detail
+{
+
+inline bool string_to_unsigned( std::string const& s, unsigned& v )
+{
+ v = 0;
+
+ if( s.empty() )
+ {
+ return false;
+ }
+
+ for( char const* p = s.c_str(); *p; ++p )
+ {
+ unsigned char ch = static_cast<unsigned char>( *p );
+
+ if( ch < '0' || ch > '9' )
+ {
+ return false;
+ }
+
+ if( v > UINT_MAX / 10 )
+ {
+ return false;
+ }
+
+ unsigned q = static_cast<unsigned>( ch - '0' );
+
+ if( v == UINT_MAX / 10 && q > UINT_MAX % 10 )
+ {
+ return false;
+ }
+
+ v = v * 10 + q;
+ }
+
+ return true;
+}
+
+} // namespace thread_detail
+} // namespace boost
+
+#endif // #ifndef BOOST_THREAD_DETAIL_STRING_TO_UNSIGNED_HPP_INCLUDED
diff --git a/contrib/restricted/boost/thread/include/boost/thread/detail/string_trim.hpp b/contrib/restricted/boost/thread/include/boost/thread/detail/string_trim.hpp
new file mode 100644
index 0000000000..886525f2cf
--- /dev/null
+++ b/contrib/restricted/boost/thread/include/boost/thread/detail/string_trim.hpp
@@ -0,0 +1,29 @@
+#ifndef BOOST_THREAD_DETAIL_STRING_TRIM_HPP_INCLUDED
+#define BOOST_THREAD_DETAIL_STRING_TRIM_HPP_INCLUDED
+
+// Copyright 2023 Peter Dimov
+// Distributed under the Boost Software License, Version 1.0.
+// https://www.boost.org/LICENSE_1_0.txt
+
+#include <string>
+
+namespace boost
+{
+namespace thread_detail
+{
+
+inline std::string string_trim( std::string const& s )
+{
+ std::size_t i = s.find_first_not_of( " \t\r\n" );
+
+ if( i == std::string::npos ) return std::string();
+
+ std::size_t j = s.find_last_not_of( " \t\r\n" );
+
+ return s.substr( i, j + 1 - i );
+}
+
+} // namespace thread_detail
+} // namespace boost
+
+#endif // #ifndef BOOST_THREAD_DETAIL_STRING_TRIM_HPP_INCLUDED
diff --git a/contrib/restricted/boost/thread/include/boost/thread/future.hpp b/contrib/restricted/boost/thread/include/boost/thread/future.hpp
index bbf0ffc809..00f504b9b8 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/future.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/future.hpp
@@ -63,7 +63,6 @@ struct shared_state_base {
#include <boost/enable_shared_from_this.hpp>
#include <boost/exception_ptr.hpp>
#include <boost/function.hpp>
-#include <boost/next_prior.hpp>
#include <boost/scoped_array.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/smart_ptr/make_shared.hpp>
diff --git a/contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_any.hpp b/contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_any.hpp
index 68ec065618..3f5d7b0555 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_any.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/futures/wait_for_any.hpp
@@ -17,7 +17,6 @@
#include <boost/thread/condition_variable.hpp>
#include <boost/core/enable_if.hpp>
-#include <boost/next_prior.hpp>
#include <boost/scoped_array.hpp>
#include <iterator>
@@ -155,7 +154,9 @@ namespace boost
{
waiter.add(*current);
}
- return boost::next(begin, waiter.wait());
+
+ std::advance( begin, waiter.wait() );
+ return begin;
}
}
diff --git a/contrib/restricted/boost/thread/include/boost/thread/win32/basic_timed_mutex.hpp b/contrib/restricted/boost/thread/include/boost/thread/win32/basic_timed_mutex.hpp
index b332dab752..f0905e665a 100644
--- a/contrib/restricted/boost/thread/include/boost/thread/win32/basic_timed_mutex.hpp
+++ b/contrib/restricted/boost/thread/include/boost/thread/win32/basic_timed_mutex.hpp
@@ -30,7 +30,7 @@ namespace boost
{
namespace detail
{
- struct basic_timed_mutex
+ struct BOOST_THREAD_CAPABILITY("mutex") basic_timed_mutex
{
BOOST_STATIC_CONSTANT(unsigned char,lock_flag_bit=31);
BOOST_STATIC_CONSTANT(unsigned char,event_set_flag_bit=30);
@@ -62,12 +62,12 @@ namespace boost
}
// Take the lock flag if it's available
- bool try_lock() BOOST_NOEXCEPT
+ bool try_lock() BOOST_NOEXCEPT BOOST_THREAD_TRY_ACQUIRE(true)
{
return !win32::interlocked_bit_test_and_set(&active_count,lock_flag_bit);
}
- void lock()
+ void lock() BOOST_THREAD_ACQUIRE()
{
if(try_lock())
{
@@ -93,7 +93,7 @@ namespace boost
// Loop until the number of waiters has been incremented or we've taken the lock flag
// The loop is necessary since this function may be called by multiple threads simultaneously
- void mark_waiting_and_try_lock(long& old_count)
+ void mark_waiting_and_try_lock(long& old_count) BOOST_THREAD_TRY_ACQUIRE(true)
{
for(;;)
{
@@ -117,7 +117,7 @@ namespace boost
// until we've taken the lock flag and cleared the event set flag and decremented the
// number of waiters
// The loop is necessary since this function may be called by multiple threads simultaneously
- void clear_waiting_and_try_lock(long& old_count)
+ void clear_waiting_and_try_lock(long& old_count) BOOST_THREAD_TRY_ACQUIRE(true)
{
old_count&=~lock_flag_value;
old_count|=event_set_flag_value;
@@ -152,7 +152,7 @@ namespace boost
}
template <typename Clock, typename Timepoint, typename Duration>
- bool do_lock_until(Timepoint const& t, Duration const& max)
+ bool do_lock_until(Timepoint const& t, Duration const& max) BOOST_THREAD_TRY_ACQUIRE(true)
{
if(try_lock())
{
@@ -238,7 +238,7 @@ namespace boost
}
#endif
- void unlock()
+ void unlock() BOOST_THREAD_RELEASE()
{
// Clear the lock flag using atomic addition (works since long is always 32 bits on Windows)
long const old_count=BOOST_INTERLOCKED_EXCHANGE_ADD(&active_count,lock_flag_value);
diff --git a/contrib/restricted/boost/thread/src/pthread/thread.cpp b/contrib/restricted/boost/thread/src/pthread/thread.cpp
index c17aca2cc4..bcaa787071 100644
--- a/contrib/restricted/boost/thread/src/pthread/thread.cpp
+++ b/contrib/restricted/boost/thread/src/pthread/thread.cpp
@@ -19,6 +19,8 @@
#include <boost/thread/future.hpp>
#include <boost/thread/pthread/pthread_helpers.hpp>
#include <boost/thread/pthread/pthread_mutex_scoped_lock.hpp>
+#include <boost/thread/detail/string_trim.hpp>
+#include <boost/thread/detail/string_to_unsigned.hpp>
#ifdef __GLIBC__
#include <sys/sysinfo.h>
@@ -33,10 +35,6 @@
#include <vxCpuLib.h>
#endif
-#include <boost/algorithm/string/split.hpp>
-#include <boost/algorithm/string/trim.hpp>
-#include <boost/lexical_cast.hpp>
-
#include <fstream>
#include <string>
#include <set>
@@ -535,24 +533,36 @@ namespace boost
if (line.empty())
continue;
- vector<string> key_val(2);
- boost::split(key_val, line, boost::is_any_of(":"));
+ std::size_t i = line.find( ':' );
+
+ if( i == std::string::npos )
+ {
+ return hardware_concurrency();
+ }
- if (key_val.size() != 2)
- return hardware_concurrency();
+ std::string key = line.substr( 0, i );
+ std::string value = line.substr( i+1 );
- string key = key_val[0];
- string value = key_val[1];
- boost::trim(key);
- boost::trim(value);
+ key = thread_detail::string_trim( key );
+ value = thread_detail::string_trim( value );
if (key == physical_id) {
- current_core_entry.first = boost::lexical_cast<unsigned>(value);
+
+ if( !thread_detail::string_to_unsigned( value, current_core_entry.first ) )
+ {
+ return hardware_concurrency();
+ }
+
continue;
}
if (key == core_id) {
- current_core_entry.second = boost::lexical_cast<unsigned>(value);
+
+ if( !thread_detail::string_to_unsigned( value, current_core_entry.second ) )
+ {
+ return hardware_concurrency();
+ }
+
cores.insert(current_core_entry);
continue;
}
diff --git a/contrib/restricted/boost/thread/ya.make b/contrib/restricted/boost/thread/ya.make
index cc5d0ca6a5..3e55c727da 100644
--- a/contrib/restricted/boost/thread/ya.make
+++ b/contrib/restricted/boost/thread/ya.make
@@ -10,12 +10,11 @@ LICENSE(
LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
-VERSION(1.83.0)
+VERSION(1.84.0)
-ORIGINAL_SOURCE(https://github.com/boostorg/thread/archive/boost-1.83.0.tar.gz)
+ORIGINAL_SOURCE(https://github.com/boostorg/thread/archive/boost-1.84.0.tar.gz)
PEERDIR(
- contrib/restricted/boost/algorithm
contrib/restricted/boost/assert
contrib/restricted/boost/atomic
contrib/restricted/boost/bind
@@ -28,10 +27,7 @@ PEERDIR(
contrib/restricted/boost/date_time
contrib/restricted/boost/exception
contrib/restricted/boost/function
- contrib/restricted/boost/intrusive
contrib/restricted/boost/io
- contrib/restricted/boost/iterator
- contrib/restricted/boost/lexical_cast
contrib/restricted/boost/move
contrib/restricted/boost/optional
contrib/restricted/boost/predef