diff options
| author | mikhnenko <[email protected]> | 2024-12-05 10:49:03 +0300 |
|---|---|---|
| committer | mikhnenko <[email protected]> | 2024-12-05 11:21:12 +0300 |
| commit | 681668b400e84754eb7acbc0e173491bb4dfc8b2 (patch) | |
| tree | e809b0abb22e9c506c032e256effebcf9ea88dbd /contrib/libs/cxxsupp/libcxx/include/__thread/thread.h | |
| parent | fe60cde3cf1989964159845c2929a65056a8dcf3 (diff) | |
Update libcxx to 18 Dec 3b0705827dbe711788c6b6bec3afa94205db1ce8
commit_hash:875d8582c26b8bf016af25e00ad77d9bbf081948
Diffstat (limited to 'contrib/libs/cxxsupp/libcxx/include/__thread/thread.h')
| -rw-r--r-- | contrib/libs/cxxsupp/libcxx/include/__thread/thread.h | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h b/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h index a1861e49488..ee37a0320d6 100644 --- a/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h +++ b/contrib/libs/cxxsupp/libcxx/include/__thread/thread.h @@ -21,7 +21,6 @@ #include <__thread/id.h> #include <__threading_support> #include <__utility/forward.h> -#include <iosfwd> #include <tuple> #ifndef _LIBCPP_HAS_NO_LOCALIZATION @@ -77,11 +76,11 @@ public: ~__thread_specific_ptr(); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI pointer get() const {return static_cast<_Tp*>(__libcpp_tls_get(__key_));} - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI pointer operator*() const {return *get();} - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI pointer operator->() const {return get();} void set_pointer(pointer __p); }; @@ -124,7 +123,7 @@ template<> struct _LIBCPP_TEMPLATE_VIS hash<__thread_id> : public __unary_function<__thread_id, size_t> { - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI size_t operator()(__thread_id __v) const _NOEXCEPT { return hash<__libcpp_thread_id>()(__v.__id_); @@ -133,7 +132,7 @@ struct _LIBCPP_TEMPLATE_VIS hash<__thread_id> #ifndef _LIBCPP_HAS_NO_LOCALIZATION template <class _CharT, class _Traits> -_LIBCPP_INLINE_VISIBILITY basic_ostream<_CharT, _Traits>& +_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>& operator<<(basic_ostream<_CharT, _Traits>& __os, __thread_id __id) { // [thread.thread.id]/9 // Effects: Inserts the text representation for charT of id into out. @@ -168,7 +167,7 @@ public: typedef __thread_id id; typedef __libcpp_thread_t native_handle_type; - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI thread() _NOEXCEPT : __t_(_LIBCPP_NULL_THREAD) {} #ifndef _LIBCPP_CXX03_LANG template <class _Fp, class ..._Args, @@ -182,12 +181,12 @@ public: #endif ~thread(); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI thread(thread&& __t) _NOEXCEPT : __t_(__t.__t_) { __t.__t_ = _LIBCPP_NULL_THREAD; } - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI thread& operator=(thread&& __t) _NOEXCEPT { if (!__libcpp_thread_isnull(&__t_)) terminate(); @@ -196,16 +195,16 @@ public: return *this; } - _LIBCPP_INLINE_VISIBILITY - void swap(thread& __t) _NOEXCEPT {_VSTD::swap(__t_, __t.__t_);} + _LIBCPP_HIDE_FROM_ABI + void swap(thread& __t) _NOEXCEPT {std::swap(__t_, __t.__t_);} - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI bool joinable() const _NOEXCEPT {return !__libcpp_thread_isnull(&__t_);} void join(); void detach(); - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI id get_id() const _NOEXCEPT {return __libcpp_thread_get_id(&__t_);} - _LIBCPP_INLINE_VISIBILITY + _LIBCPP_HIDE_FROM_ABI native_handle_type native_handle() _NOEXCEPT {return __t_;} static unsigned hardware_concurrency() _NOEXCEPT; @@ -214,22 +213,22 @@ public: #ifndef _LIBCPP_CXX03_LANG template <class _TSp, class _Fp, class ..._Args, size_t ..._Indices> -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI void __thread_execute(tuple<_TSp, _Fp, _Args...>& __t, __tuple_indices<_Indices...>) { - _VSTD::__invoke(_VSTD::move(_VSTD::get<1>(__t)), _VSTD::move(_VSTD::get<_Indices>(__t))...); + std::__invoke(std::move(std::get<1>(__t)), std::move(std::get<_Indices>(__t))...); } template <class _Fp> -_LIBCPP_INLINE_VISIBILITY +_LIBCPP_HIDE_FROM_ABI void* __thread_proxy(void* __vp) { // _Fp = tuple< unique_ptr<__thread_struct>, Functor, Args...> unique_ptr<_Fp> __p(static_cast<_Fp*>(__vp)); - __thread_local_data().set_pointer(_VSTD::get<0>(*__p.get()).release()); + __thread_local_data().set_pointer(std::get<0>(*__p.get()).release()); typedef typename __make_tuple_indices<tuple_size<_Fp>::value, 2>::type _Index; - _VSTD::__thread_execute(*__p.get(), _Index()); + std::__thread_execute(*__p.get(), _Index()); return nullptr; } @@ -242,10 +241,10 @@ thread::thread(_Fp&& __f, _Args&&... __args) _TSPtr __tsp(new __thread_struct); typedef tuple<_TSPtr, __decay_t<_Fp>, __decay_t<_Args>...> _Gp; unique_ptr<_Gp> __p( - new _Gp(_VSTD::move(__tsp), - _VSTD::forward<_Fp>(__f), - _VSTD::forward<_Args>(__args)...)); - int __ec = _VSTD::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get()); + new _Gp(std::move(__tsp), + std::forward<_Fp>(__f), + std::forward<_Args>(__args)...)); + int __ec = std::__libcpp_thread_create(&__t_, &__thread_proxy<_Gp>, __p.get()); if (__ec == 0) __p.release(); else @@ -280,7 +279,7 @@ thread::thread(_Fp __f) typedef __thread_invoke_pair<_Fp> _InvokePair; typedef unique_ptr<_InvokePair> _PairPtr; _PairPtr __pp(new _InvokePair(__f)); - int __ec = _VSTD::__libcpp_thread_create(&__t_, &__thread_proxy_cxx03<_InvokePair>, __pp.get()); + int __ec = std::__libcpp_thread_create(&__t_, &__thread_proxy_cxx03<_InvokePair>, __pp.get()); if (__ec == 0) __pp.release(); else @@ -289,7 +288,7 @@ thread::thread(_Fp __f) #endif // _LIBCPP_CXX03_LANG -inline _LIBCPP_INLINE_VISIBILITY +inline _LIBCPP_HIDE_FROM_ABI void swap(thread& __x, thread& __y) _NOEXCEPT {__x.swap(__y);} _LIBCPP_END_NAMESPACE_STD |
