From 7ca12905823d3c4d72ee9e9296cb13233f97f52d Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 28 Sep 2025 16:04:35 +0100 Subject: [PATCH 01/26] [libc++] Allows any types of size 4 and 8 to use native platform ulock_wait --- libcxx/include/__atomic/atomic.h | 2 + libcxx/include/__atomic/atomic_flag.h | 2 + libcxx/include/__atomic/atomic_ref.h | 2 + libcxx/include/__atomic/atomic_sync.h | 60 +++++++++-- libcxx/include/__atomic/contention_t.h | 17 +++ libcxx/src/atomic.cpp | 144 ++++++++++++++++--------- 6 files changed, 172 insertions(+), 55 deletions(-) diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h index 44835820bb06c..3eb5dc6a7a6ce 100644 --- a/libcxx/include/__atomic/atomic.h +++ b/libcxx/include/__atomic/atomic.h @@ -206,6 +206,8 @@ struct __atomic_base<_Tp, true> : public __atomic_base<_Tp, false> { // __atomic_base. So specializing __atomic_base<_Tp> does not work template struct __atomic_waitable_traits<__atomic_base<_Tp, _IsIntegral> > { + using __inner_type _LIBCPP_NODEBUG = _Tp; + static _LIBCPP_HIDE_FROM_ABI _Tp __atomic_load(const __atomic_base<_Tp, _IsIntegral>& __a, memory_order __order) { return __a.load(__order); } diff --git a/libcxx/include/__atomic/atomic_flag.h b/libcxx/include/__atomic/atomic_flag.h index 28ed2d53b77da..39b3ad442e7bb 100644 --- a/libcxx/include/__atomic/atomic_flag.h +++ b/libcxx/include/__atomic/atomic_flag.h @@ -76,6 +76,8 @@ struct atomic_flag { template <> struct __atomic_waitable_traits { + using __inner_type _LIBCPP_NODEBUG = _LIBCPP_ATOMIC_FLAG_TYPE; + static _LIBCPP_HIDE_FROM_ABI _LIBCPP_ATOMIC_FLAG_TYPE __atomic_load(const atomic_flag& __a, memory_order __order) { return std::__cxx_atomic_load(&__a.__a_, __order); } diff --git a/libcxx/include/__atomic/atomic_ref.h b/libcxx/include/__atomic/atomic_ref.h index ec5ae2c28c310..c7c1362964e6f 100644 --- a/libcxx/include/__atomic/atomic_ref.h +++ b/libcxx/include/__atomic/atomic_ref.h @@ -233,6 +233,8 @@ struct __atomic_ref_base { template struct __atomic_waitable_traits<__atomic_ref_base<_Tp>> { + using __inner_type _LIBCPP_NODEBUG = _Tp; + static _LIBCPP_HIDE_FROM_ABI _Tp __atomic_load(const __atomic_ref_base<_Tp>& __a, memory_order __order) { return __a.load(__order); } diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index 93953dfbc9b8a..8365c0994a06f 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -38,6 +38,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD // The below implementations look ugly to support C++03 template struct __atomic_waitable_traits { + using __inner_type _LIBCPP_NODEBUG = void; + template static void __atomic_load(_AtomicWaitable&&, memory_order) = delete; @@ -58,6 +60,7 @@ struct __atomic_waitable< _Tp, #if _LIBCPP_STD_VER >= 20 # if _LIBCPP_HAS_THREADS +<<<<<<< HEAD _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile*) _NOEXCEPT; @@ -69,6 +72,28 @@ _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) _NOEXCEPT; +======= +template +_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native(void const volatile* __address, void const volatile* __old_value) _NOEXCEPT; + +_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t +__libcpp_atomic_monitor_global(void const volatile* __address) _NOEXCEPT; + +_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_global_table(void const volatile* __address, __cxx_contention_t __monitor_value) _NOEXCEPT; + +_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_global_table(void const volatile*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_global_table(void const volatile*) _NOEXCEPT; + +template +_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__cxx_atomic_notify_one_native(const volatile void*) _NOEXCEPT; + +template +_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__cxx_atomic_notify_all_native(const volatile void*) _NOEXCEPT; +>>>>>>> 59d6fc2ba487 ([libc++] Allows any types of size 4 and 8 to use native platform ulock_wait) template struct __atomic_wait_backoff_impl { @@ -77,6 +102,7 @@ struct __atomic_wait_backoff_impl { memory_order __order_; using __waitable_traits _LIBCPP_NODEBUG = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >; +<<<<<<< HEAD _LIBCPP_HIDE_FROM_ABI bool __update_monitor_val_and_poll(__cxx_atomic_contention_t const volatile*, __cxx_contention_t& __monitor_val) const { @@ -98,14 +124,26 @@ struct __atomic_wait_backoff_impl { auto __current_val = __waitable_traits::__atomic_load(__a_, __order_); return __poll_(__current_val); } +======= + using __inner_type _LIBCPP_NODEBUG = typename __waitable_traits::__inner_type; +>>>>>>> 59d6fc2ba487 ([libc++] Allows any types of size 4 and 8 to use native platform ulock_wait) _LIBCPP_HIDE_FROM_ABI bool operator()(chrono::nanoseconds __elapsed) const { if (__elapsed > chrono::microseconds(4)) { auto __contention_address = __waitable_traits::__atomic_contention_address(__a_); - __cxx_contention_t __monitor_val; - if (__update_monitor_val_and_poll(__contention_address, __monitor_val)) - return true; - std::__libcpp_atomic_wait(__contention_address, __monitor_val); + + if constexpr (__is_atomic_wait_native_type<__inner_type>::value) { + auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); + if (__poll_(__atomic_value)) + return true; + std::__libcpp_atomic_wait_native(__contention_address, &__atomic_value); + } else { + __cxx_contention_t __monitor_val = std::__libcpp_atomic_monitor_global(__contention_address); + auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); + if (__poll_(__atomic_value)) + return true; + std::__libcpp_atomic_wait_global_table(__contention_address, __monitor_val); + } } else { } // poll return false; @@ -136,13 +174,23 @@ _LIBCPP_HIDE_FROM_ABI void __atomic_wait_unless(const _AtomicWaitable& __a, memo template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); - std::__cxx_atomic_notify_one(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + using __inner_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__inner_type; + if constexpr (__is_atomic_wait_native_type<__inner_type>::value) { + std::__cxx_atomic_notify_one_native(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + } else { + std::__cxx_atomic_notify_one_global_table(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + } } template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); - std::__cxx_atomic_notify_all(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + using __inner_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__inner_type; + if constexpr (__is_atomic_wait_native_type<__inner_type>::value) { + std::__cxx_atomic_notify_all_native(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + } else { + std::__cxx_atomic_notify_all_global_table(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + } } # else // _LIBCPP_HAS_THREADS diff --git a/libcxx/include/__atomic/contention_t.h b/libcxx/include/__atomic/contention_t.h index 5b42a0125f875..bf14d076d6281 100644 --- a/libcxx/include/__atomic/contention_t.h +++ b/libcxx/include/__atomic/contention_t.h @@ -11,6 +11,10 @@ #include <__atomic/support.h> #include <__config> +#include <__type_traits/enable_if.h> +#include <__type_traits/integral_constant.h> +#include <__type_traits/is_integral.h> +#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -19,10 +23,23 @@ _LIBCPP_BEGIN_NAMESPACE_STD +template +struct __is_atomic_wait_native_type : false_type {}; + #if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__)) using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; + +template +struct __is_atomic_wait_native_type<_Tp, __enable_if_t::value && sizeof(_Tp) == 4> > : true_type {}; + #else using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; + +template +struct __is_atomic_wait_native_type<_Tp, + __enable_if_t::value && (sizeof(_Tp) == 4 || sizeof(_Tp) == 8)> > + : true_type {}; + #endif // __linux__ || (_AIX && !__64BIT__) using __cxx_atomic_contention_t _LIBCPP_NODEBUG = __cxx_atomic_impl<__cxx_contention_t>; diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index b9e4aa30bbdcd..ba1b48a9042fb 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -9,6 +9,7 @@ #include <__thread/timed_backoff_policy.h> #include #include +#include #include #include @@ -58,6 +59,8 @@ _LIBCPP_BEGIN_NAMESPACE_STD #ifdef __linux__ + +// TODO : update static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) { static constexpr timespec __timeout = {2, 0}; @@ -75,22 +78,32 @@ extern "C" int __ulock_wait( extern "C" int __ulock_wake(uint32_t operation, void* addr, uint64_t wake_value); // https://github.com/apple/darwin-xnu/blob/2ff845c2e033bd0ff64b5b6aa6063a1f8f65aa32/bsd/sys/ulock.h#L82 +# define UL_COMPARE_AND_WAIT 1 # define UL_COMPARE_AND_WAIT64 5 # define ULF_WAKE_ALL 0x00000100 -static void -__libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) { - static_assert(sizeof(__cxx_atomic_contention_t) == 8, "Waiting on 8 bytes value"); - __ulock_wait(UL_COMPARE_AND_WAIT64, const_cast<__cxx_atomic_contention_t*>(__ptr), __val, 0); +template +static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const volatile* __val) { + static_assert(_Size == 8 || _Size == 4, "Can only wait on 8 bytes or 4 bytes value"); + if constexpr (_Size == 4) + __ulock_wait(UL_COMPARE_AND_WAIT, const_cast(__ptr), *reinterpret_cast(__val), 0); + else + __ulock_wait( + UL_COMPARE_AND_WAIT64, const_cast(__ptr), *reinterpret_cast(__val), 0); } -static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr, bool __notify_one) { - static_assert(sizeof(__cxx_atomic_contention_t) == 8, "Waking up on 8 bytes value"); - __ulock_wake( - UL_COMPARE_AND_WAIT64 | (__notify_one ? 0 : ULF_WAKE_ALL), const_cast<__cxx_atomic_contention_t*>(__ptr), 0); +template +static void __libcpp_platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { + static_assert(_Size == 8 || _Size == 4, "Can only wake up on 8 bytes or 4 bytes value"); + + if constexpr (_Size == 4) + __ulock_wake(UL_COMPARE_AND_WAIT | (__notify_one ? 0 : ULF_WAKE_ALL), const_cast(__ptr), 0); + else + __ulock_wake(UL_COMPARE_AND_WAIT64 | (__notify_one ? 0 : ULF_WAKE_ALL), const_cast(__ptr), 0); } #elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 +// TODO : update /* * Since __cxx_contention_t is int64_t even on 32bit FreeBSD * platforms, we have to use umtx ops that work on the long type, and @@ -173,6 +186,7 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo #else // <- Add other operating systems here // Baseline is just a timed backoff +// TODO : update static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) { @@ -197,83 +211,115 @@ static __libcpp_contention_table_entry __libcpp_contention_table[__libcpp_conten static hash __libcpp_contention_hasher; -static __libcpp_contention_table_entry* __libcpp_contention_state(void const volatile* p) { +static __libcpp_contention_table_entry* __get_global_contention_state(void const volatile* p) { return &__libcpp_contention_table[__libcpp_contention_hasher(p) & (__libcpp_contention_table_size - 1)]; } /* Given an atomic to track contention and an atomic to actually wait on, which may be the same atomic, we try to detect contention to avoid spuriously calling the platform. */ -static void __libcpp_contention_notify(__cxx_atomic_contention_t volatile* __contention_state, - __cxx_atomic_contention_t const volatile* __platform_state, +template +static void __libcpp_contention_notify(__cxx_atomic_contention_t volatile* __global_contention_state, + void const volatile* __address_to_notify, bool __notify_one) { - if (0 != __cxx_atomic_load(__contention_state, memory_order_seq_cst)) + if (0 != __cxx_atomic_load(__global_contention_state, memory_order_seq_cst)) // We only call 'wake' if we consumed a contention bit here. - __libcpp_platform_wake_by_address(__platform_state, __notify_one); -} -static __cxx_contention_t -__libcpp_contention_monitor_for_wait(__cxx_atomic_contention_t volatile* /*__contention_state*/, - __cxx_atomic_contention_t const volatile* __platform_state) { - // We will monitor this value. - return __cxx_atomic_load(__platform_state, memory_order_acquire); + __libcpp_platform_wake_by_address<_Size>(__address_to_notify, __notify_one); } + +template static void __libcpp_contention_wait(__cxx_atomic_contention_t volatile* __contention_state, - __cxx_atomic_contention_t const volatile* __platform_state, - __cxx_contention_t __old_value) { + void const volatile* __address_to_wait, + void const volatile* __old_value) { __cxx_atomic_fetch_add(__contention_state, __cxx_contention_t(1), memory_order_relaxed); // https://llvm.org/PR109290 // There are no platform guarantees of a memory barrier in the platform wait implementation __cxx_atomic_thread_fence(memory_order_seq_cst); // We sleep as long as the monitored value hasn't changed. - __libcpp_platform_wait_on_address(__platform_state, __old_value); + __libcpp_platform_wait_on_address<_Size>(__address_to_wait, __old_value); __cxx_atomic_fetch_sub(__contention_state, __cxx_contention_t(1), memory_order_release); } /* When the incoming atomic is the wrong size for the platform wait size, need to launder the value sequence through an atomic from our table. */ -static void __libcpp_atomic_notify(void const volatile* __location) { - auto const __entry = __libcpp_contention_state(__location); +static void __atomic_notify_global_table(void const volatile* __location) { + auto const __entry = __get_global_contention_state(__location); // The value sequence laundering happens on the next line below. __cxx_atomic_fetch_add(&__entry->__platform_state, __cxx_contention_t(1), memory_order_seq_cst); - __libcpp_contention_notify( + __libcpp_contention_notify( &__entry->__contention_state, &__entry->__platform_state, false /* when laundering, we can't handle notify_one */); } -_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile* __location) noexcept { - __libcpp_atomic_notify(__location); + +_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor_global(void const volatile* __location) noexcept { + auto const __entry = __get_global_contention_state(__location); + return __cxx_atomic_load(&__entry->__platform_state, memory_order_acquire); } -_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile* __location) noexcept { - __libcpp_atomic_notify(__location); + +_LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_global_table(void const volatile* __location, __cxx_contention_t __old_value) noexcept { + auto const __entry = __get_global_contention_state(__location); + __libcpp_contention_wait( + &__entry->__contention_state, &__entry->__platform_state, &__old_value); } -_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile* __location) noexcept { - auto const __entry = __libcpp_contention_state(__location); - return __libcpp_contention_monitor_for_wait(&__entry->__contention_state, &__entry->__platform_state); + +template +_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native(void const volatile* __address, void const volatile* __old_value) noexcept { + __libcpp_contention_wait<_Size>( + &__get_global_contention_state(__address)->__contention_state, __address, __old_value); } -_LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait(void const volatile* __location, __cxx_contention_t __old_value) noexcept { - auto const __entry = __libcpp_contention_state(__location); - __libcpp_contention_wait(&__entry->__contention_state, &__entry->__platform_state, __old_value); + +_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_global_table(void const volatile* __location) noexcept { + __atomic_notify_global_table(__location); +} +_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_global_table(void const volatile* __location) noexcept { + __atomic_notify_global_table(__location); } /* When the incoming atomic happens to be the platform wait size, we still need to use the table for the contention detection, but we can use the atomic directly for the wait. */ -_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile* __location) noexcept { - __libcpp_contention_notify(&__libcpp_contention_state(__location)->__contention_state, __location, true); -} -_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile* __location) noexcept { - __libcpp_contention_notify(&__libcpp_contention_state(__location)->__contention_state, __location, false); +template +_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_native(void const volatile* __location) noexcept { + __libcpp_contention_notify<_Size>(&__get_global_contention_state(__location)->__contention_state, __location, true); } -// This function is never used, but still exported for ABI compatibility. -_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t -__libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile* __location) noexcept { - return __libcpp_contention_monitor_for_wait(&__libcpp_contention_state(__location)->__contention_state, __location); -} -_LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait(__cxx_atomic_contention_t const volatile* __location, __cxx_contention_t __old_value) noexcept { - __libcpp_contention_wait(&__libcpp_contention_state(__location)->__contention_state, __location, __old_value); + +template +_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_native(void const volatile* __location) noexcept { + __libcpp_contention_notify<_Size>(&__get_global_contention_state(__location)->__contention_state, __location, false); } +#ifdef __linux__ + +// TODO + +#elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK) + +template _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native<4>(void const volatile* __address, void const volatile* __old_value) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native<8>(void const volatile* __address, void const volatile* __old_value) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_native<4>(void const volatile* __location) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_native<8>(void const volatile* __location) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_native<4>(void const volatile* __location) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_native<8>(void const volatile* __location) noexcept; + +#elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 + +// TODO + +#else // <- Add other operating systems here + +// TODO + +#endif // __linux__ + _LIBCPP_END_NAMESPACE_STD From 1949548b804eed218fb9b9c2d0507b509d87b534 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 28 Sep 2025 20:29:01 +0100 Subject: [PATCH 02/26] standard layout types --- libcxx/include/__atomic/contention_t.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libcxx/include/__atomic/contention_t.h b/libcxx/include/__atomic/contention_t.h index bf14d076d6281..a356dc83a1d8b 100644 --- a/libcxx/include/__atomic/contention_t.h +++ b/libcxx/include/__atomic/contention_t.h @@ -13,7 +13,7 @@ #include <__config> #include <__type_traits/enable_if.h> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_integral.h> +#include <__type_traits/is_standard_layout.h> #include #include @@ -30,14 +30,14 @@ struct __is_atomic_wait_native_type : false_type {}; using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; template -struct __is_atomic_wait_native_type<_Tp, __enable_if_t::value && sizeof(_Tp) == 4> > : true_type {}; +struct __is_atomic_wait_native_type<_Tp, __enable_if_t::value && sizeof(_Tp) == 4> > : true_type {}; #else using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; template struct __is_atomic_wait_native_type<_Tp, - __enable_if_t::value && (sizeof(_Tp) == 4 || sizeof(_Tp) == 8)> > + __enable_if_t::value && (sizeof(_Tp) == 4 || sizeof(_Tp) == 8)> > : true_type {}; #endif // __linux__ || (_AIX && !__64BIT__) From 62a774e7b541a59bbb05d94c02139496b037a517 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 11 Oct 2025 22:08:29 +0100 Subject: [PATCH 03/26] add abi macro and availablity macro --- libcxx/docs/ABIGuarantees.rst | 8 + libcxx/include/__atomic/atomic.h | 2 +- libcxx/include/__atomic/atomic_flag.h | 2 +- libcxx/include/__atomic/atomic_ref.h | 2 +- libcxx/include/__atomic/atomic_sync.h | 82 ++++---- libcxx/include/__atomic/contention_t.h | 24 ++- libcxx/include/__configuration/abi.h | 1 + libcxx/include/__configuration/availability.h | 15 ++ libcxx/src/atomic.cpp | 176 ++++++++++++------ 9 files changed, 202 insertions(+), 110 deletions(-) diff --git a/libcxx/docs/ABIGuarantees.rst b/libcxx/docs/ABIGuarantees.rst index 4d4674c7756a4..2d8ef5cc5f037 100644 --- a/libcxx/docs/ABIGuarantees.rst +++ b/libcxx/docs/ABIGuarantees.rst @@ -205,6 +205,14 @@ This flag fixes the implementation of CityHash used for ``hash CityHash has the problem that it drops some bits on the floor. Fixing the implementation changes the hash of values, resulting in an ABI break. +``_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE`` +------------------------------------------------- +This flag changes the implementation of ``atomic::wait()`` and ``atomic::notify_one()/notify_all()`` to use the +native atomic wait/notify operations on platforms that support them based on the size of the atomic type, instead +of the type itself. This changes the behaviour of ``atomic::wait()`` and ``atomic::notify_one()/notify_all()`` in +some cases, resulting in an ABI break. + + inline namespaces ================= Inline namespaces which contain types that are observable by the user need to be kept the same, since they affect diff --git a/libcxx/include/__atomic/atomic.h b/libcxx/include/__atomic/atomic.h index 3eb5dc6a7a6ce..554c111d695f2 100644 --- a/libcxx/include/__atomic/atomic.h +++ b/libcxx/include/__atomic/atomic.h @@ -206,7 +206,7 @@ struct __atomic_base<_Tp, true> : public __atomic_base<_Tp, false> { // __atomic_base. So specializing __atomic_base<_Tp> does not work template struct __atomic_waitable_traits<__atomic_base<_Tp, _IsIntegral> > { - using __inner_type _LIBCPP_NODEBUG = _Tp; + using __value_type _LIBCPP_NODEBUG = _Tp; static _LIBCPP_HIDE_FROM_ABI _Tp __atomic_load(const __atomic_base<_Tp, _IsIntegral>& __a, memory_order __order) { return __a.load(__order); diff --git a/libcxx/include/__atomic/atomic_flag.h b/libcxx/include/__atomic/atomic_flag.h index 39b3ad442e7bb..321a6283ba7ad 100644 --- a/libcxx/include/__atomic/atomic_flag.h +++ b/libcxx/include/__atomic/atomic_flag.h @@ -76,7 +76,7 @@ struct atomic_flag { template <> struct __atomic_waitable_traits { - using __inner_type _LIBCPP_NODEBUG = _LIBCPP_ATOMIC_FLAG_TYPE; + using __value_type _LIBCPP_NODEBUG = _LIBCPP_ATOMIC_FLAG_TYPE; static _LIBCPP_HIDE_FROM_ABI _LIBCPP_ATOMIC_FLAG_TYPE __atomic_load(const atomic_flag& __a, memory_order __order) { return std::__cxx_atomic_load(&__a.__a_, __order); diff --git a/libcxx/include/__atomic/atomic_ref.h b/libcxx/include/__atomic/atomic_ref.h index c7c1362964e6f..9a36aaa3b84fe 100644 --- a/libcxx/include/__atomic/atomic_ref.h +++ b/libcxx/include/__atomic/atomic_ref.h @@ -233,7 +233,7 @@ struct __atomic_ref_base { template struct __atomic_waitable_traits<__atomic_ref_base<_Tp>> { - using __inner_type _LIBCPP_NODEBUG = _Tp; + using __value_type _LIBCPP_NODEBUG = _Tp; static _LIBCPP_HIDE_FROM_ABI _Tp __atomic_load(const __atomic_ref_base<_Tp>& __a, memory_order __order) { return __a.load(__order); diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index 8365c0994a06f..c8c5cf658550b 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -38,7 +38,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD // The below implementations look ugly to support C++03 template struct __atomic_waitable_traits { - using __inner_type _LIBCPP_NODEBUG = void; + using __value_type _LIBCPP_NODEBUG = void; template static void __atomic_load(_AtomicWaitable&&, memory_order) = delete; @@ -60,7 +60,7 @@ struct __atomic_waitable< _Tp, #if _LIBCPP_STD_VER >= 20 # if _LIBCPP_HAS_THREADS -<<<<<<< HEAD +// old dylib interface _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile*) _NOEXCEPT; @@ -72,28 +72,30 @@ _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) _NOEXCEPT; -======= -template -_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native(void const volatile* __address, void const volatile* __old_value) _NOEXCEPT; -_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t +// new dylib interface +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor_global(void const volatile* __address) _NOEXCEPT; -_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait_global_table(void const volatile* __address, __cxx_contention_t __monitor_value) _NOEXCEPT; -_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_global_table(void const volatile*) _NOEXCEPT; -_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_global_table(void const volatile*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_notify_one_global_table(void const volatile*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_notify_all_global_table(void const volatile*) _NOEXCEPT; + +template +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native(void const volatile* __address, void const volatile* __old_value) _NOEXCEPT; template -_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__cxx_atomic_notify_one_native(const volatile void*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_notify_one_native(const volatile void*) _NOEXCEPT; template -_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__cxx_atomic_notify_all_native(const volatile void*) _NOEXCEPT; ->>>>>>> 59d6fc2ba487 ([libc++] Allows any types of size 4 and 8 to use native platform ulock_wait) +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_notify_all_native(const volatile void*) _NOEXCEPT; template struct __atomic_wait_backoff_impl { @@ -102,41 +104,17 @@ struct __atomic_wait_backoff_impl { memory_order __order_; using __waitable_traits _LIBCPP_NODEBUG = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >; -<<<<<<< HEAD - - _LIBCPP_HIDE_FROM_ABI bool - __update_monitor_val_and_poll(__cxx_atomic_contention_t const volatile*, __cxx_contention_t& __monitor_val) const { - // In case the contention type happens to be __cxx_atomic_contention_t, i.e. __cxx_atomic_impl, - // the platform wait is directly monitoring the atomic value itself. - // `__poll_` takes the current value of the atomic as an in-out argument - // to potentially modify it. After it returns, `__monitor` has a value - // which can be safely waited on by `std::__libcpp_atomic_wait` without any - // ABA style issues. - __monitor_val = __waitable_traits::__atomic_load(__a_, __order_); - return __poll_(__monitor_val); - } - - _LIBCPP_HIDE_FROM_ABI bool - __update_monitor_val_and_poll(void const volatile* __contention_address, __cxx_contention_t& __monitor_val) const { - // In case the contention type is anything else, platform wait is monitoring a __cxx_atomic_contention_t - // from the global pool, the monitor comes from __libcpp_atomic_monitor - __monitor_val = std::__libcpp_atomic_monitor(__contention_address); - auto __current_val = __waitable_traits::__atomic_load(__a_, __order_); - return __poll_(__current_val); - } -======= - using __inner_type _LIBCPP_NODEBUG = typename __waitable_traits::__inner_type; ->>>>>>> 59d6fc2ba487 ([libc++] Allows any types of size 4 and 8 to use native platform ulock_wait) + using __value_type _LIBCPP_NODEBUG = typename __waitable_traits::__value_type; _LIBCPP_HIDE_FROM_ABI bool operator()(chrono::nanoseconds __elapsed) const { if (__elapsed > chrono::microseconds(4)) { auto __contention_address = __waitable_traits::__atomic_contention_address(__a_); - if constexpr (__is_atomic_wait_native_type<__inner_type>::value) { + if constexpr (__is_atomic_wait_native_type<__value_type>::value) { auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); if (__poll_(__atomic_value)) return true; - std::__libcpp_atomic_wait_native(__contention_address, &__atomic_value); + std::__libcpp_atomic_wait_native(__contention_address, &__atomic_value); } else { __cxx_contention_t __monitor_val = std::__libcpp_atomic_monitor_global(__contention_address); auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); @@ -174,22 +152,26 @@ _LIBCPP_HIDE_FROM_ABI void __atomic_wait_unless(const _AtomicWaitable& __a, memo template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); - using __inner_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__inner_type; - if constexpr (__is_atomic_wait_native_type<__inner_type>::value) { - std::__cxx_atomic_notify_one_native(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + using __value_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__value_type; + if constexpr (__is_atomic_wait_native_type<__value_type>::value) { + std::__libcpp_atomic_notify_one_native( + __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } else { - std::__cxx_atomic_notify_one_global_table(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + std::__libcpp_atomic_notify_one_global_table( + __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } } template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); - using __inner_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__inner_type; - if constexpr (__is_atomic_wait_native_type<__inner_type>::value) { - std::__cxx_atomic_notify_all_native(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + using __value_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__value_type; + if constexpr (__is_atomic_wait_native_type<__value_type>::value) { + std::__libcpp_atomic_notify_all_native( + __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } else { - std::__cxx_atomic_notify_all_global_table(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + std::__libcpp_atomic_notify_all_global_table( + __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } } diff --git a/libcxx/include/__atomic/contention_t.h b/libcxx/include/__atomic/contention_t.h index a356dc83a1d8b..7a12d82850f7a 100644 --- a/libcxx/include/__atomic/contention_t.h +++ b/libcxx/include/__atomic/contention_t.h @@ -12,8 +12,9 @@ #include <__atomic/support.h> #include <__config> #include <__type_traits/enable_if.h> +#include <__type_traits/has_unique_object_representation.h> #include <__type_traits/integral_constant.h> -#include <__type_traits/is_standard_layout.h> +#include <__type_traits/is_same.h> #include #include @@ -29,16 +30,31 @@ struct __is_atomic_wait_native_type : false_type {}; #if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__)) using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; +# if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) template -struct __is_atomic_wait_native_type<_Tp, __enable_if_t::value && sizeof(_Tp) == 4> > : true_type {}; +struct __is_atomic_wait_native_type<_Tp, + __enable_if_t::value && sizeof(_Tp) == 4> > + : true_type {}; +# else +template +struct __is_atomic_wait_native_type<_Tp, __enable_if_t::value && sizeof(_Tp) == 4> > : true_type { +}; +# endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE #else using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; +# if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) template -struct __is_atomic_wait_native_type<_Tp, - __enable_if_t::value && (sizeof(_Tp) == 4 || sizeof(_Tp) == 8)> > +struct __is_atomic_wait_native_type< + _Tp, + __enable_if_t::value && (sizeof(_Tp) == 4 || sizeof(_Tp) == 8)> > : true_type {}; +# else +template +struct __is_atomic_wait_native_type<_Tp, __enable_if_t::value && sizeof(_Tp) == 4> > : true_type { +}; +# endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE #endif // __linux__ || (_AIX && !__64BIT__) diff --git a/libcxx/include/__configuration/abi.h b/libcxx/include/__configuration/abi.h index 38b85c6ac70de..f30d0a5445b19 100644 --- a/libcxx/include/__configuration/abi.h +++ b/libcxx/include/__configuration/abi.h @@ -63,6 +63,7 @@ // These flags are documented in ABIGuarantees.rst # define _LIBCPP_ABI_ALTERNATE_STRING_LAYOUT +# define _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE # define _LIBCPP_ABI_DO_NOT_EXPORT_BASIC_STRING_COMMON # define _LIBCPP_ABI_DO_NOT_EXPORT_VECTOR_BASE_COMMON # define _LIBCPP_ABI_DO_NOT_EXPORT_TO_CHARS_BASE_10 diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h index 5433df872fa39..4abd717a307fd 100644 --- a/libcxx/include/__configuration/availability.h +++ b/libcxx/include/__configuration/availability.h @@ -84,6 +84,9 @@ // in all versions of the library are available. #if !_LIBCPP_HAS_VENDOR_AVAILABILITY_ANNOTATIONS +# define _LIBCPP_INTRODUCED_IN_LLVM_22 1 +# define _LIBCPP_INTRODUCED_IN_LLVM_22_ATTRIBUTE /* nothing */ + # define _LIBCPP_INTRODUCED_IN_LLVM_21 1 # define _LIBCPP_INTRODUCED_IN_LLVM_21_ATTRIBUTE /* nothing */ @@ -112,6 +115,11 @@ // clang-format off +// LLVM 22 +// TODO: Fill this in +# define _LIBCPP_INTRODUCED_IN_LLVM_22 0 +# define _LIBCPP_INTRODUCED_IN_LLVM_22_ATTRIBUTE __attribute__((unavailable)) + // LLVM 21 // TODO: Fill this in # define _LIBCPP_INTRODUCED_IN_LLVM_21 0 @@ -242,6 +250,13 @@ #endif +// This controls the availability of new implementation of std::atomic's +// wait, notify_one and notify all. The new implementation uses +// the native atomic wait/notify operations on platforms that support them +// based on the size of the atomic type, instead of the type itself. +#define _LIBCPP_AVAILABILITY_HAS_NEW_SYNC _LIBCPP_INTRODUCED_IN_LLVM_22 +#define _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_INTRODUCED_IN_LLVM_22_ATTRIBUTE + // Enable additional explicit instantiations of iostreams components. This // reduces the number of weak definitions generated in programs that use // iostreams by providing a single strong definition in the shared library. diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index ba1b48a9042fb..c59ae36d2cb89 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -6,10 +6,12 @@ // //===----------------------------------------------------------------------===// +#include <__atomic/contention_t.h> #include <__thread/timed_backoff_policy.h> #include #include #include +#include #include #include @@ -59,7 +61,6 @@ _LIBCPP_BEGIN_NAMESPACE_STD #ifdef __linux__ - // TODO : update static void __libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) { @@ -85,11 +86,12 @@ extern "C" int __ulock_wake(uint32_t operation, void* addr, uint64_t wake_value) template static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const volatile* __val) { static_assert(_Size == 8 || _Size == 4, "Can only wait on 8 bytes or 4 bytes value"); + char buffer[_Size]; + std::memcpy(&buffer, const_cast(__val), _Size); if constexpr (_Size == 4) - __ulock_wait(UL_COMPARE_AND_WAIT, const_cast(__ptr), *reinterpret_cast(__val), 0); + __ulock_wait(UL_COMPARE_AND_WAIT, const_cast(__ptr), *reinterpret_cast(&buffer), 0); else - __ulock_wait( - UL_COMPARE_AND_WAIT64, const_cast(__ptr), *reinterpret_cast(__val), 0); + __ulock_wait(UL_COMPARE_AND_WAIT64, const_cast(__ptr), *reinterpret_cast(&buffer), 0); } template @@ -199,45 +201,70 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo #endif // __linux__ -static constexpr size_t __libcpp_contention_table_size = (1 << 8); /* < there's no magic in this number */ - -struct alignas(64) /* aim to avoid false sharing */ __libcpp_contention_table_entry { - __cxx_atomic_contention_t __contention_state; - __cxx_atomic_contention_t __platform_state; - inline constexpr __libcpp_contention_table_entry() : __contention_state(0), __platform_state(0) {} -}; - -static __libcpp_contention_table_entry __libcpp_contention_table[__libcpp_contention_table_size]; - -static hash __libcpp_contention_hasher; - -static __libcpp_contention_table_entry* __get_global_contention_state(void const volatile* p) { - return &__libcpp_contention_table[__libcpp_contention_hasher(p) & (__libcpp_contention_table_size - 1)]; -} +// ============================= +// Local hidden helper functions +// ============================= /* Given an atomic to track contention and an atomic to actually wait on, which may be the same atomic, we try to detect contention to avoid spuriously calling the platform. */ template -static void __libcpp_contention_notify(__cxx_atomic_contention_t volatile* __global_contention_state, - void const volatile* __address_to_notify, - bool __notify_one) { - if (0 != __cxx_atomic_load(__global_contention_state, memory_order_seq_cst)) +static void __contention_notify( + __cxx_atomic_contention_t volatile* __waiter_count, void const volatile* __address_to_notify, bool __notify_one) { + if (0 != __cxx_atomic_load(__waiter_count, memory_order_seq_cst)) // We only call 'wake' if we consumed a contention bit here. __libcpp_platform_wake_by_address<_Size>(__address_to_notify, __notify_one); } template -static void __libcpp_contention_wait(__cxx_atomic_contention_t volatile* __contention_state, - void const volatile* __address_to_wait, - void const volatile* __old_value) { - __cxx_atomic_fetch_add(__contention_state, __cxx_contention_t(1), memory_order_relaxed); +static void __contention_wait(__cxx_atomic_contention_t volatile* __waiter_count, + void const volatile* __address_to_wait, + void const volatile* __old_value) { + __cxx_atomic_fetch_add(__waiter_count, __cxx_contention_t(1), memory_order_relaxed); // https://llvm.org/PR109290 // There are no platform guarantees of a memory barrier in the platform wait implementation __cxx_atomic_thread_fence(memory_order_seq_cst); // We sleep as long as the monitored value hasn't changed. __libcpp_platform_wait_on_address<_Size>(__address_to_wait, __old_value); - __cxx_atomic_fetch_sub(__contention_state, __cxx_contention_t(1), memory_order_release); + __cxx_atomic_fetch_sub(__waiter_count, __cxx_contention_t(1), memory_order_release); +} + +#if defined(__APPLE__) && defined(__aarch64__) +constexpr size_t __cache_line_size = 128; +#else +constexpr size_t __cache_line_size = 64; +#endif + +static constexpr size_t __contention_table_size = (1 << 8); /* < there's no magic in this number */ + +static constexpr hash __contention_hasher; + +// Waiter count table for all atomics with the correct size that use itself as the wait/notify address. + +struct alignas(__cache_line_size) /* aim to avoid false sharing */ __contention_state_native { + __cxx_atomic_contention_t __waiter_count; + constexpr __contention_state_native() : __waiter_count(0) {} +}; + +static __contention_state_native __contention_table_native[__contention_table_size]; + +static __cxx_atomic_contention_t* __get_native_waiter_count(void const volatile* p) { + return &__contention_table_native[__contention_hasher(p) & (__contention_table_size - 1)].__waiter_count; +} + +// Global contention table for all atomics with the wrong size that use the global table's atomic as wait/notify +// address. + +struct alignas(__cache_line_size) /* aim to avoid false sharing */ __contention_state_global { + __cxx_atomic_contention_t __waiter_count; + __cxx_atomic_contention_t __platform_state; + constexpr __contention_state_global() : __waiter_count(0), __platform_state(0) {} +}; + +static __contention_state_global __contention_table_global[__contention_table_size]; + +static __contention_state_global* __get_global_contention_state(void const volatile* p) { + return &__contention_table_global[__contention_hasher(p) & (__contention_table_size - 1)]; } /* When the incoming atomic is the wrong size for the platform wait size, need to @@ -247,12 +274,15 @@ static void __atomic_notify_global_table(void const volatile* __location) { auto const __entry = __get_global_contention_state(__location); // The value sequence laundering happens on the next line below. __cxx_atomic_fetch_add(&__entry->__platform_state, __cxx_contention_t(1), memory_order_seq_cst); - __libcpp_contention_notify( - &__entry->__contention_state, - &__entry->__platform_state, - false /* when laundering, we can't handle notify_one */); + __contention_notify( + &__entry->__waiter_count, &__entry->__platform_state, false /* when laundering, we can't handle notify_one */); } +// ============================= +// New dylib exported symbols +// ============================= + +// global _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor_global(void const volatile* __location) noexcept { auto const __entry = __get_global_contention_state(__location); return __cxx_atomic_load(&__entry->__platform_state, memory_order_acquire); @@ -261,37 +291,37 @@ _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor_global(void _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait_global_table(void const volatile* __location, __cxx_contention_t __old_value) noexcept { auto const __entry = __get_global_contention_state(__location); - __libcpp_contention_wait( - &__entry->__contention_state, &__entry->__platform_state, &__old_value); + __contention_wait( + &__entry->__waiter_count, &__entry->__platform_state, &__old_value); } -template -_LIBCPP_AVAILABILITY_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native(void const volatile* __address, void const volatile* __old_value) noexcept { - __libcpp_contention_wait<_Size>( - &__get_global_contention_state(__address)->__contention_state, __address, __old_value); -} - -_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_global_table(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_global_table(void const volatile* __location) noexcept { __atomic_notify_global_table(__location); } -_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_global_table(void const volatile* __location) noexcept { + +_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_global_table(void const volatile* __location) noexcept { __atomic_notify_global_table(__location); } -/* When the incoming atomic happens to be the platform wait size, we still need to use the - table for the contention detection, but we can use the atomic directly for the wait. */ +// native + +template +_LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native(void const volatile* __address, void const volatile* __old_value) noexcept { + __contention_wait<_Size>(__get_native_waiter_count(__address), __address, __old_value); +} template -_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_native(void const volatile* __location) noexcept { - __libcpp_contention_notify<_Size>(&__get_global_contention_state(__location)->__contention_state, __location, true); +_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native(void const volatile* __location) noexcept { + __contention_notify<_Size>(__get_native_waiter_count(__location), __location, true); } template -_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_native(void const volatile* __location) noexcept { - __libcpp_contention_notify<_Size>(&__get_global_contention_state(__location)->__contention_state, __location, false); +_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native(void const volatile* __location) noexcept { + __contention_notify<_Size>(__get_native_waiter_count(__location), __location, false); } +// Instantiation of the templates with supported size #ifdef __linux__ // TODO @@ -304,13 +334,13 @@ __libcpp_atomic_wait_native<4>(void const volatile* __address, void const volati template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait_native<8>(void const volatile* __address, void const volatile* __old_value) noexcept; -template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_native<4>(void const volatile* __location) noexcept; +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<4>(void const volatile* __location) noexcept; -template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one_native<8>(void const volatile* __location) noexcept; +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<8>(void const volatile* __location) noexcept; -template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_native<4>(void const volatile* __location) noexcept; +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<4>(void const volatile* __location) noexcept; -template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_native<8>(void const volatile* __location) noexcept; +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<8>(void const volatile* __location) noexcept; #elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 @@ -322,4 +352,44 @@ template _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all_native<8>(void c #endif // __linux__ +// ============================================================= +// Old dylib exported symbols, for backwards compatibility +// ============================================================= + +_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile* __location) noexcept { + __libcpp_atomic_notify_one_global_table(__location); +} + +_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile* __location) noexcept { + __libcpp_atomic_notify_all_global_table(__location); +} + +_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile* __location) noexcept { + return __libcpp_atomic_monitor_global(__location); +} + +_LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait(void const volatile* __location, __cxx_contention_t __old_value) noexcept { + __libcpp_atomic_wait_global_table(__location, __old_value); +} + +_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile* __location) noexcept { + __libcpp_atomic_notify_one_native(__location); +} + +_LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile* __location) noexcept { + __libcpp_atomic_notify_all_native(__location); +} + +_LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait(__cxx_atomic_contention_t const volatile* __location, __cxx_contention_t __old_value) noexcept { + __libcpp_atomic_wait_native(__location, &__old_value); +} + +// this function is even unused in the old ABI +_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t +__libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile* __location) noexcept { + return __cxx_atomic_load(__location, memory_order_acquire); +} + _LIBCPP_END_NAMESPACE_STD From c5d67694d3301c9cba0c59e904f49a3bd852275e Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 11 Oct 2025 22:17:07 +0100 Subject: [PATCH 04/26] fix volatile --- libcxx/src/atomic.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index c59ae36d2cb89..fcf2bbfd024f8 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -84,7 +84,7 @@ extern "C" int __ulock_wake(uint32_t operation, void* addr, uint64_t wake_value) # define ULF_WAKE_ALL 0x00000100 template -static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const volatile* __val) { +static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const* __val) { static_assert(_Size == 8 || _Size == 4, "Can only wait on 8 bytes or 4 bytes value"); char buffer[_Size]; std::memcpy(&buffer, const_cast(__val), _Size); @@ -219,7 +219,7 @@ static void __contention_notify( template static void __contention_wait(__cxx_atomic_contention_t volatile* __waiter_count, void const volatile* __address_to_wait, - void const volatile* __old_value) { + void const* __old_value) { __cxx_atomic_fetch_add(__waiter_count, __cxx_contention_t(1), memory_order_relaxed); // https://llvm.org/PR109290 // There are no platform guarantees of a memory barrier in the platform wait implementation @@ -307,7 +307,7 @@ _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_global_table(void cons template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native(void const volatile* __address, void const volatile* __old_value) noexcept { +__libcpp_atomic_wait_native(void const volatile* __address, void const* __old_value) noexcept { __contention_wait<_Size>(__get_native_waiter_count(__address), __address, __old_value); } @@ -329,10 +329,10 @@ _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native(void const vola #elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK) template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native<4>(void const volatile* __address, void const volatile* __old_value) noexcept; +__libcpp_atomic_wait_native<4>(void const volatile* __address, void const* __old_value) noexcept; template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native<8>(void const volatile* __address, void const volatile* __old_value) noexcept; +__libcpp_atomic_wait_native<8>(void const volatile* __address, void const* __old_value) noexcept; template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<4>(void const volatile* __location) noexcept; From 71bba6f553884cc433274f97e8635c0327d12cdb Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 11 Oct 2025 22:48:01 +0100 Subject: [PATCH 05/26] add support for linux --- libcxx/src/atomic.cpp | 61 +++++++++++++++++++++++++++++-------------- 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index fcf2bbfd024f8..72084686989bc 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -61,14 +61,18 @@ _LIBCPP_BEGIN_NAMESPACE_STD #ifdef __linux__ -// TODO : update -static void -__libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) { +template +static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const* __val) { + static_assert(_Size == 4, "Can only wait on 4 bytes value"); + char buffer[_Size]; + std::memcpy(&buffer, const_cast(__val), _Size); static constexpr timespec __timeout = {2, 0}; - _LIBCPP_FUTEX(__ptr, FUTEX_WAIT_PRIVATE, __val, &__timeout, 0, 0); + _LIBCPP_FUTEX(__ptr, FUTEX_WAIT_PRIVATE, *reinterpret_cast<__cxx_contention_t const*>(&buffer), &__timeout, 0, 0); } -static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr, bool __notify_one) { +template +static void __libcpp_platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { + static_assert(_Size == 4, "Can only wake up on 4 bytes value"); _LIBCPP_FUTEX(__ptr, FUTEX_WAKE_PRIVATE, __notify_one ? 1 : INT_MAX, 0, 0, 0); } @@ -105,20 +109,24 @@ static void __libcpp_platform_wake_by_address(void const volatile* __ptr, bool _ } #elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 -// TODO : update /* * Since __cxx_contention_t is int64_t even on 32bit FreeBSD * platforms, we have to use umtx ops that work on the long type, and * limit its use to architectures where long and int64_t are synonyms. */ -static void -__libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) { - _umtx_op(const_cast<__cxx_atomic_contention_t*>(__ptr), UMTX_OP_WAIT, __val, nullptr, nullptr); +template +static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const* __val) { + static_assert(_Size == 8, "Can only wait on 8 bytes value"); + char buffer[_Size]; + std::memcpy(&buffer, const_cast(__val), _Size); + _umtx_op(const_cast(__ptr), UMTX_OP_WAIT, *reinterpret_cast<__cxx_contention_t*>(&buffer), nullptr, nullptr); } -static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr, bool __notify_one) { - _umtx_op(const_cast<__cxx_atomic_contention_t*>(__ptr), UMTX_OP_WAKE, __notify_one ? 1 : INT_MAX, nullptr, nullptr); +template +static void __libcpp_platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { + static_assert(_Size == 8, "Can only wake up on 8 bytes value"); + _umtx_op(const_cast(__ptr), UMTX_OP_WAKE, __notify_one ? 1 : INT_MAX, nullptr, nullptr); } #elif defined(_WIN32) @@ -188,16 +196,16 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo #else // <- Add other operating systems here // Baseline is just a timed backoff -// TODO : update -static void -__libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) { +template +static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const* __val) { __libcpp_thread_poll_with_backoff( - [=]() -> bool { return !__cxx_nonatomic_compare_equal(__cxx_atomic_load(__ptr, memory_order_relaxed), __val); }, + [=]() -> bool { return !std::memcmp(const_cast(__ptr), __val, _Size); }, __libcpp_timed_backoff_policy()); } -static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile*, bool) {} +template +static void __libcpp_platform_wake_by_address(void const volatile*, bool) {} #endif // __linux__ @@ -324,7 +332,12 @@ _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native(void const vola // Instantiation of the templates with supported size #ifdef __linux__ -// TODO +template _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native<4>(void const volatile* __address, void const* __old_value) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<4>(void const volatile* __location) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<4>(void const volatile* __location) noexcept; #elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK) @@ -344,11 +357,21 @@ template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<8>(voi #elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 -// TODO +template _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native<8>(void const volatile* __address, void const* __old_value) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<8>(void const volatile* __location) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<8>(void const volatile* __location) noexcept; #else // <- Add other operating systems here -// TODO +template _LIBCPP_EXPORTED_FROM_ABI void +__libcpp_atomic_wait_native<8>(void const volatile* __address, void const* __old_value) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<8>(void const volatile* __location) noexcept; + +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<8>(void const volatile* __location) noexcept; #endif // __linux__ From 9450b1d858cabdfba33f9674c9571cd346b38f15 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 11 Oct 2025 22:55:23 +0100 Subject: [PATCH 06/26] format --- libcxx/include/__atomic/atomic_sync.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index c8c5cf658550b..a5b7132f5c4f0 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -104,7 +104,7 @@ struct __atomic_wait_backoff_impl { memory_order __order_; using __waitable_traits _LIBCPP_NODEBUG = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >; - using __value_type _LIBCPP_NODEBUG = typename __waitable_traits::__value_type; + using __value_type _LIBCPP_NODEBUG = typename __waitable_traits::__value_type; _LIBCPP_HIDE_FROM_ABI bool operator()(chrono::nanoseconds __elapsed) const { if (__elapsed > chrono::microseconds(4)) { From e9796553fedaafe0e861e7a4de9ff9d365a9ed6f Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 19 Oct 2025 10:29:10 +0100 Subject: [PATCH 07/26] CI --- libcxx/include/__atomic/atomic_sync.h | 54 ++++++++++++++++++++++++-- libcxx/include/__atomic/contention_t.h | 33 ---------------- libcxx/src/atomic.cpp | 53 ++++++++----------------- 3 files changed, 67 insertions(+), 73 deletions(-) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index a5b7132f5c4f0..774df93315bf5 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -9,16 +9,20 @@ #ifndef _LIBCPP___ATOMIC_ATOMIC_SYNC_H #define _LIBCPP___ATOMIC_ATOMIC_SYNC_H +#include <__algorithm/ranges_find.h> #include <__atomic/contention_t.h> #include <__atomic/memory_order.h> #include <__atomic/to_gcc_order.h> #include <__chrono/duration.h> #include <__config> #include <__memory/addressof.h> +#include <__ranges/access.h> #include <__thread/poll_with_backoff.h> #include <__type_traits/conjunction.h> #include <__type_traits/decay.h> +#include <__type_traits/has_unique_object_representation.h> #include <__type_traits/invoke.h> +#include <__type_traits/is_same.h> #include <__type_traits/void_t.h> #include <__utility/declval.h> #include @@ -88,7 +92,7 @@ __libcpp_atomic_notify_all_global_table(void const volatile*) _NOEXCEPT; template _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native(void const volatile* __address, void const volatile* __old_value) _NOEXCEPT; +__libcpp_atomic_wait_native(void const volatile* __address, void const* __old_value) _NOEXCEPT; template _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native(const volatile void*) _NOEXCEPT; @@ -97,6 +101,48 @@ template _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native(const volatile void*) _NOEXCEPT; +// concepts defines the types are supported natively by the platform's wait + +# if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) + +# ifdef __linux__ + +# define _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_APPLY) _APPLY(4) + +# elif defined(__APPLE__) + +# define _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_APPLY) \ + _APPLY(4) \ + _APPLY(8) + +# elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 + +# define _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_APPLY) _APPLY(8) + +# else + +# define _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_APPLY) _APPLY(sizeof(__cxx_contention_t)) + +# endif // __linux__ + +inline constexpr std::size_t __supported_native_wait_sizes[] = { +# define _IDENTITY(_SIZE) _SIZE, + _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_IDENTITY) +# undef _IDENTITY +}; + +template +concept __atomic_wait_native_type = + has_unique_object_representations_v<_Tp> && + std::ranges::find(__supported_native_wait_sizes, sizeof(_Tp)) != ranges::end(__supported_native_wait_sizes); + +# else // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE + +template +concept __atomic_wait_native_type = is_same_v<_Tp, __cxx_contention_t>; + +# endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE + template struct __atomic_wait_backoff_impl { const _AtomicWaitable& __a_; @@ -110,7 +156,7 @@ struct __atomic_wait_backoff_impl { if (__elapsed > chrono::microseconds(4)) { auto __contention_address = __waitable_traits::__atomic_contention_address(__a_); - if constexpr (__is_atomic_wait_native_type<__value_type>::value) { + if constexpr (__atomic_wait_native_type<__value_type>) { auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); if (__poll_(__atomic_value)) return true; @@ -153,7 +199,7 @@ template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); using __value_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__value_type; - if constexpr (__is_atomic_wait_native_type<__value_type>::value) { + if constexpr (__atomic_wait_native_type<__value_type>) { std::__libcpp_atomic_notify_one_native( __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } else { @@ -166,7 +212,7 @@ template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); using __value_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__value_type; - if constexpr (__is_atomic_wait_native_type<__value_type>::value) { + if constexpr (__atomic_wait_native_type<__value_type>) { std::__libcpp_atomic_notify_all_native( __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } else { diff --git a/libcxx/include/__atomic/contention_t.h b/libcxx/include/__atomic/contention_t.h index 7a12d82850f7a..5b42a0125f875 100644 --- a/libcxx/include/__atomic/contention_t.h +++ b/libcxx/include/__atomic/contention_t.h @@ -11,11 +11,6 @@ #include <__atomic/support.h> #include <__config> -#include <__type_traits/enable_if.h> -#include <__type_traits/has_unique_object_representation.h> -#include <__type_traits/integral_constant.h> -#include <__type_traits/is_same.h> -#include #include #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) @@ -24,38 +19,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD -template -struct __is_atomic_wait_native_type : false_type {}; - #if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__)) using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; - -# if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) -template -struct __is_atomic_wait_native_type<_Tp, - __enable_if_t::value && sizeof(_Tp) == 4> > - : true_type {}; -# else -template -struct __is_atomic_wait_native_type<_Tp, __enable_if_t::value && sizeof(_Tp) == 4> > : true_type { -}; -# endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE - #else using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; - -# if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) -template -struct __is_atomic_wait_native_type< - _Tp, - __enable_if_t::value && (sizeof(_Tp) == 4 || sizeof(_Tp) == 8)> > - : true_type {}; -# else -template -struct __is_atomic_wait_native_type<_Tp, __enable_if_t::value && sizeof(_Tp) == 4> > : true_type { -}; -# endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE - #endif // __linux__ || (_AIX && !__64BIT__) using __cxx_atomic_contention_t _LIBCPP_NODEBUG = __cxx_atomic_impl<__cxx_contention_t>; diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index 72084686989bc..9db1a884c3847 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -5,15 +5,13 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// - -#include <__atomic/contention_t.h> -#include <__thread/timed_backoff_policy.h> #include #include #include #include #include #include +#include #include "include/apple_availability.h" @@ -329,51 +327,34 @@ _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native(void const vola __contention_notify<_Size>(__get_native_waiter_count(__location), __location, false); } +// ================================================== // Instantiation of the templates with supported size -#ifdef __linux__ - -template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native<4>(void const volatile* __address, void const* __old_value) noexcept; - -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<4>(void const volatile* __location) noexcept; +// ================================================== -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<4>(void const volatile* __location) noexcept; +#if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) -#elif defined(__APPLE__) && defined(_LIBCPP_USE_ULOCK) - -template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native<4>(void const volatile* __address, void const* __old_value) noexcept; - -template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native<8>(void const volatile* __address, void const* __old_value) noexcept; +# define _INSTANTIATE(_SIZE) \ + template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait_native<_SIZE>( \ + void const volatile*, void const*) noexcept; \ + template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<_SIZE>(void const volatile*) noexcept; \ + template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<_SIZE>(void const volatile*) noexcept; -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<4>(void const volatile* __location) noexcept; +_LIBCPP_ATOMIC_WAIT_SIZES_LIST(_INSTANTIATE) -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<8>(void const volatile* __location) noexcept; +# undef _INSTANTIATE -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<4>(void const volatile* __location) noexcept; +#else // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<8>(void const volatile* __location) noexcept; - -#elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 +template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait_native( + void const volatile* __address, void const* __old_value) noexcept; template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native<8>(void const volatile* __address, void const* __old_value) noexcept; - -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<8>(void const volatile* __location) noexcept; - -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<8>(void const volatile* __location) noexcept; - -#else // <- Add other operating systems here +__libcpp_atomic_notify_one_native(void const volatile* __location) noexcept; template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native<8>(void const volatile* __address, void const* __old_value) noexcept; - -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<8>(void const volatile* __location) noexcept; +__libcpp_atomic_notify_all_native(void const volatile* __location) noexcept; -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<8>(void const volatile* __location) noexcept; - -#endif // __linux__ +#endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE // ============================================================= // Old dylib exported symbols, for backwards compatibility From 5f39c049d25d7a326a6f723a50d45fcd2475b3ab Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 19 Oct 2025 13:52:29 +0100 Subject: [PATCH 08/26] ci --- libcxx/include/__atomic/atomic_sync.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index 774df93315bf5..a3af513b016cf 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -160,7 +160,7 @@ struct __atomic_wait_backoff_impl { auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); if (__poll_(__atomic_value)) return true; - std::__libcpp_atomic_wait_native(__contention_address, &__atomic_value); + std::__libcpp_atomic_wait_native(__contention_address, std::addressof(__atomic_value)); } else { __cxx_contention_t __monitor_val = std::__libcpp_atomic_monitor_global(__contention_address); auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); From f536ff40b08f5625a61f85c290e0201c25572d4e Mon Sep 17 00:00:00 2001 From: Hui Date: Sun, 2 Nov 2025 11:14:19 +0000 Subject: [PATCH 09/26] Update libcxx/docs/ABIGuarantees.rst Co-authored-by: Louis Dionne --- libcxx/docs/ABIGuarantees.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/docs/ABIGuarantees.rst b/libcxx/docs/ABIGuarantees.rst index 2d8ef5cc5f037..a8917e1730eff 100644 --- a/libcxx/docs/ABIGuarantees.rst +++ b/libcxx/docs/ABIGuarantees.rst @@ -206,7 +206,7 @@ CityHash has the problem that it drops some bits on the floor. Fixing the implem resulting in an ABI break. ``_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE`` -------------------------------------------------- +------------------------------------------ This flag changes the implementation of ``atomic::wait()`` and ``atomic::notify_one()/notify_all()`` to use the native atomic wait/notify operations on platforms that support them based on the size of the atomic type, instead of the type itself. This changes the behaviour of ``atomic::wait()`` and ``atomic::notify_one()/notify_all()`` in From 2a87a3e7829e1ca2a4b7ef40cde6e13f9d94a4de Mon Sep 17 00:00:00 2001 From: Hui Date: Sun, 2 Nov 2025 11:14:29 +0000 Subject: [PATCH 10/26] Update libcxx/docs/ABIGuarantees.rst Co-authored-by: Louis Dionne --- libcxx/docs/ABIGuarantees.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libcxx/docs/ABIGuarantees.rst b/libcxx/docs/ABIGuarantees.rst index a8917e1730eff..9fa60b3fbdc09 100644 --- a/libcxx/docs/ABIGuarantees.rst +++ b/libcxx/docs/ABIGuarantees.rst @@ -209,8 +209,7 @@ resulting in an ABI break. ------------------------------------------ This flag changes the implementation of ``atomic::wait()`` and ``atomic::notify_one()/notify_all()`` to use the native atomic wait/notify operations on platforms that support them based on the size of the atomic type, instead -of the type itself. This changes the behaviour of ``atomic::wait()`` and ``atomic::notify_one()/notify_all()`` in -some cases, resulting in an ABI break. +of the type itself. This means for example that a type with ``sizeof(T) == 4`` on Linux that doesn't have padding bytes would be able to use the underlying platform's atomic wait primitive, which is otherwise only used for ``int32_t``. Since the whole program must use the same implementation for correctness, changing this is an ABI break since libc++ supports linking against TUs that were compiled against older versions of the library. inline namespaces From 9950df23f4637bd17a55b82b7945937029aff756 Mon Sep 17 00:00:00 2001 From: Hui Date: Sun, 2 Nov 2025 11:14:39 +0000 Subject: [PATCH 11/26] Update libcxx/include/__atomic/atomic_sync.h Co-authored-by: Louis Dionne --- libcxx/include/__atomic/atomic_sync.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index a3af513b016cf..08bc055f37c72 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -64,7 +64,7 @@ struct __atomic_waitable< _Tp, #if _LIBCPP_STD_VER >= 20 # if _LIBCPP_HAS_THREADS -// old dylib interface +// old dylib interface kept for backwards compatibility _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile*) _NOEXCEPT; From 012aad2349a6a2dabc74414806599faf4203f35e Mon Sep 17 00:00:00 2001 From: Hui Date: Sun, 2 Nov 2025 11:15:03 +0000 Subject: [PATCH 12/26] Update libcxx/include/__atomic/atomic_sync.h Co-authored-by: Louis Dionne --- libcxx/include/__atomic/atomic_sync.h | 1 - 1 file changed, 1 deletion(-) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index 08bc055f37c72..fc4e637854fba 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -91,7 +91,6 @@ __libcpp_atomic_notify_all_global_table(void const volatile*) _NOEXCEPT; template _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void - __libcpp_atomic_wait_native(void const volatile* __address, void const* __old_value) _NOEXCEPT; template _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void From 2711c8917ce5f108e8497d39394caf0bf7ad94d0 Mon Sep 17 00:00:00 2001 From: Hui Date: Sun, 2 Nov 2025 11:16:19 +0000 Subject: [PATCH 13/26] Update libcxx/include/__configuration/availability.h Co-authored-by: Louis Dionne --- libcxx/include/__configuration/availability.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/include/__configuration/availability.h b/libcxx/include/__configuration/availability.h index 4abd717a307fd..fe7aa3f51400d 100644 --- a/libcxx/include/__configuration/availability.h +++ b/libcxx/include/__configuration/availability.h @@ -251,7 +251,7 @@ #endif // This controls the availability of new implementation of std::atomic's -// wait, notify_one and notify all. The new implementation uses +// wait, notify_one and notify_all. The new implementation uses // the native atomic wait/notify operations on platforms that support them // based on the size of the atomic type, instead of the type itself. #define _LIBCPP_AVAILABILITY_HAS_NEW_SYNC _LIBCPP_INTRODUCED_IN_LLVM_22 From c24586bd482ef57c8d61be1058d0a3c157a2ddea Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 2 Nov 2025 13:55:12 +0000 Subject: [PATCH 14/26] review feedback --- libcxx/include/__atomic/atomic_sync.h | 167 +++++++++++++++++-------- libcxx/include/__atomic/contention_t.h | 24 +++- libcxx/src/atomic.cpp | 69 +++++----- 3 files changed, 173 insertions(+), 87 deletions(-) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index fc4e637854fba..5354db8bb9609 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -9,14 +9,12 @@ #ifndef _LIBCPP___ATOMIC_ATOMIC_SYNC_H #define _LIBCPP___ATOMIC_ATOMIC_SYNC_H -#include <__algorithm/ranges_find.h> #include <__atomic/contention_t.h> #include <__atomic/memory_order.h> #include <__atomic/to_gcc_order.h> #include <__chrono/duration.h> #include <__config> #include <__memory/addressof.h> -#include <__ranges/access.h> #include <__thread/poll_with_backoff.h> #include <__type_traits/conjunction.h> #include <__type_traits/decay.h> @@ -78,70 +76,77 @@ _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) _NOEXCEPT; // new dylib interface + +// return the global contention state's current value for the address _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t -__libcpp_atomic_monitor_global(void const volatile* __address) _NOEXCEPT; +__atomic_monitor_global(void const volatile* __address) _NOEXCEPT; +// wait on the global contention state to be changed from the given value for the address _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_global_table(void const volatile* __address, __cxx_contention_t __monitor_value) _NOEXCEPT; +__atomic_wait_global_table(void const volatile* __address, __cxx_contention_t __monitor_value) _NOEXCEPT; +// notify one waiter waiting on the global contention state for the address _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_notify_one_global_table(void const volatile*) _NOEXCEPT; +__atomic_notify_one_global_table(void const volatile*) _NOEXCEPT; + +// notify all waiters waiting on the global contention state for the address _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_notify_all_global_table(void const volatile*) _NOEXCEPT; +__atomic_notify_all_global_table(void const volatile*) _NOEXCEPT; +// wait on the address directly with the native platform wait template _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native(void const volatile* __address, void const* __old_value) _NOEXCEPT; +__atomic_wait_native(void const volatile* __address, void const* __old_value) _NOEXCEPT; + +// notify one waiter waiting on the address directly with the native platform wait template -_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_notify_one_native(const volatile void*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native(const volatile void*) _NOEXCEPT; +// notify all waiters waiting on the address directly with the native platform wait template -_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_notify_all_native(const volatile void*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(const volatile void*) _NOEXCEPT; + +# ifdef __linux__ +# define _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_APPLY) _APPLY(4) +# elif defined(__APPLE__) +# define _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_APPLY) \ + _APPLY(4) \ + _APPLY(8) +# elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 +# define _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_APPLY) _APPLY(8) +# else +# define _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_APPLY) _APPLY(sizeof(__cxx_contention_t)) +# endif // __linux__ // concepts defines the types are supported natively by the platform's wait # if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) -# ifdef __linux__ - -# define _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_APPLY) _APPLY(4) - -# elif defined(__APPLE__) - -# define _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_APPLY) \ - _APPLY(4) \ - _APPLY(8) - -# elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 - -# define _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_APPLY) _APPLY(8) - -# else - -# define _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_APPLY) _APPLY(sizeof(__cxx_contention_t)) - -# endif // __linux__ - -inline constexpr std::size_t __supported_native_wait_sizes[] = { -# define _IDENTITY(_SIZE) _SIZE, - _LIBCPP_ATOMIC_WAIT_SIZES_LIST(_IDENTITY) -# undef _IDENTITY -}; +_LIBCPP_HIDE_FROM_ABI constexpr bool __has_native_atomic_wait_impl(size_t __size) { + switch (__size) { +# define _LIBCPP_MAKE_CASE(n) \ + case n: \ + return true; + _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_LIBCPP_MAKE_CASE) + default: + return false; +# undef _LIBCPP_MAKE_CASE + }; +} template -concept __atomic_wait_native_type = - has_unique_object_representations_v<_Tp> && - std::ranges::find(__supported_native_wait_sizes, sizeof(_Tp)) != ranges::end(__supported_native_wait_sizes); +concept __has_native_atomic_wait = + has_unique_object_representations_v<_Tp> && __has_native_atomic_wait_impl(sizeof(_Tp)); # else // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE template -concept __atomic_wait_native_type = is_same_v<_Tp, __cxx_contention_t>; +concept __has_native_atomic_wait = is_same_v<_Tp, __cxx_contention_t>; # endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE +# if _LIBCPP_AVAILABILITY_HAS_NEW_SYNC + template struct __atomic_wait_backoff_impl { const _AtomicWaitable& __a_; @@ -155,17 +160,17 @@ struct __atomic_wait_backoff_impl { if (__elapsed > chrono::microseconds(4)) { auto __contention_address = __waitable_traits::__atomic_contention_address(__a_); - if constexpr (__atomic_wait_native_type<__value_type>) { + if constexpr (__has_native_atomic_wait<__value_type>) { auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); if (__poll_(__atomic_value)) return true; - std::__libcpp_atomic_wait_native(__contention_address, std::addressof(__atomic_value)); + std::__atomic_wait_native(__contention_address, std::addressof(__atomic_value)); } else { - __cxx_contention_t __monitor_val = std::__libcpp_atomic_monitor_global(__contention_address); + __cxx_contention_t __monitor_val = std::__atomic_monitor_global(__contention_address); auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); if (__poll_(__atomic_value)) return true; - std::__libcpp_atomic_wait_global_table(__contention_address, __monitor_val); + std::__atomic_wait_global_table(__contention_address, __monitor_val); } } else { } // poll @@ -173,6 +178,52 @@ struct __atomic_wait_backoff_impl { } }; +# else // _LIBCPP_AVAILABILITY_HAS_NEW_SYNC + +template +struct __atomic_wait_backoff_impl { + const _AtomicWaitable& __a_; + _Poll __poll_; + memory_order __order_; + + using __waitable_traits _LIBCPP_NODEBUG = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >; + + _LIBCPP_HIDE_FROM_ABI bool + __update_monitor_val_and_poll(__cxx_atomic_contention_t const volatile*, __cxx_contention_t& __monitor_val) const { + // In case the contention type happens to be __cxx_atomic_contention_t, i.e. __cxx_atomic_impl, + // the platform wait is directly monitoring the atomic value itself. + // `__poll_` takes the current value of the atomic as an in-out argument + // to potentially modify it. After it returns, `__monitor` has a value + // which can be safely waited on by `std::__libcpp_atomic_wait` without any + // ABA style issues. + __monitor_val = __waitable_traits::__atomic_load(__a_, __order_); + return __poll_(__monitor_val); + } + + _LIBCPP_HIDE_FROM_ABI bool + __update_monitor_val_and_poll(void const volatile* __contention_address, __cxx_contention_t& __monitor_val) const { + // In case the contention type is anything else, platform wait is monitoring a __cxx_atomic_contention_t + // from the global pool, the monitor comes from __libcpp_atomic_monitor + __monitor_val = std::__libcpp_atomic_monitor(__contention_address); + auto __current_val = __waitable_traits::__atomic_load(__a_, __order_); + return __poll_(__current_val); + } + + _LIBCPP_HIDE_FROM_ABI bool operator()(chrono::nanoseconds __elapsed) const { + if (__elapsed > chrono::microseconds(4)) { + auto __contention_address = __waitable_traits::__atomic_contention_address(__a_); + __cxx_contention_t __monitor_val; + if (__update_monitor_val_and_poll(__contention_address, __monitor_val)) + return true; + std::__libcpp_atomic_wait(__contention_address, __monitor_val); + } else { + } // poll + return false; + } +}; + +# endif // _LIBCPP_AVAILABILITY_HAS_NEW_SYNC + // The semantics of this function are similar to `atomic`'s // `.wait(T old, std::memory_order order)`, but instead of having a hardcoded // predicate (is the loaded value unequal to `old`?), the predicate function is @@ -194,15 +245,17 @@ _LIBCPP_HIDE_FROM_ABI void __atomic_wait_unless(const _AtomicWaitable& __a, memo /* backoff */ __backoff_fn); } +# if _LIBCPP_AVAILABILITY_HAS_NEW_SYNC + template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); using __value_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__value_type; - if constexpr (__atomic_wait_native_type<__value_type>) { - std::__libcpp_atomic_notify_one_native( + if constexpr (__has_native_atomic_wait<__value_type>) { + std::__atomic_notify_one_native( __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } else { - std::__libcpp_atomic_notify_one_global_table( + std::__atomic_notify_one_global_table( __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } } @@ -211,15 +264,29 @@ template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); using __value_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__value_type; - if constexpr (__atomic_wait_native_type<__value_type>) { - std::__libcpp_atomic_notify_all_native( + if constexpr (__has_native_atomic_wait<__value_type>) { + std::__atomic_notify_all_native( __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } else { - std::__libcpp_atomic_notify_all_global_table( + std::__atomic_notify_all_global_table( __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } } +# else // _LIBCPP_AVAILABILITY_HAS_NEW_SYNC +template +_LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) { + static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); + std::__cxx_atomic_notify_one(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); +} + +template +_LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) { + static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); + std::__cxx_atomic_notify_all(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); +} +# endif + # else // _LIBCPP_HAS_THREADS template diff --git a/libcxx/include/__atomic/contention_t.h b/libcxx/include/__atomic/contention_t.h index 5b42a0125f875..21c8fcf7b2d1c 100644 --- a/libcxx/include/__atomic/contention_t.h +++ b/libcxx/include/__atomic/contention_t.h @@ -19,11 +19,29 @@ _LIBCPP_BEGIN_NAMESPACE_STD -#if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__)) +#if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) + +# ifdef __linux__ using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; -#else +# elif defined(__APPLE__) +using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; +# elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; -#endif // __linux__ || (_AIX && !__64BIT__) +# elif defined(_AIX) && !defined(__64BIT__) +using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; +# else +using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; +# endif // __linux__ + +#else // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE + +# if defined(__linux__) || (defined(_AIX) && !defined(__64BIT__)) +using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; +# else +using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; +# endif // __linux__ || (_AIX && !__64BIT__) + +#endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE using __cxx_atomic_contention_t _LIBCPP_NODEBUG = __cxx_atomic_impl<__cxx_contention_t>; diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index 9db1a884c3847..9f9b6a8a4e7f9 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -60,7 +60,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD #ifdef __linux__ template -static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { static_assert(_Size == 4, "Can only wait on 4 bytes value"); char buffer[_Size]; std::memcpy(&buffer, const_cast(__val), _Size); @@ -69,7 +69,7 @@ static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void c } template -static void __libcpp_platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { +static void __platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { static_assert(_Size == 4, "Can only wake up on 4 bytes value"); _LIBCPP_FUTEX(__ptr, FUTEX_WAKE_PRIVATE, __notify_one ? 1 : INT_MAX, 0, 0, 0); } @@ -86,7 +86,7 @@ extern "C" int __ulock_wake(uint32_t operation, void* addr, uint64_t wake_value) # define ULF_WAKE_ALL 0x00000100 template -static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { static_assert(_Size == 8 || _Size == 4, "Can only wait on 8 bytes or 4 bytes value"); char buffer[_Size]; std::memcpy(&buffer, const_cast(__val), _Size); @@ -97,7 +97,7 @@ static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void c } template -static void __libcpp_platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { +static void __platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { static_assert(_Size == 8 || _Size == 4, "Can only wake up on 8 bytes or 4 bytes value"); if constexpr (_Size == 4) @@ -114,7 +114,7 @@ static void __libcpp_platform_wake_by_address(void const volatile* __ptr, bool _ */ template -static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { static_assert(_Size == 8, "Can only wait on 8 bytes value"); char buffer[_Size]; std::memcpy(&buffer, const_cast(__val), _Size); @@ -122,7 +122,7 @@ static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void c } template -static void __libcpp_platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { +static void __platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { static_assert(_Size == 8, "Can only wake up on 8 bytes value"); _umtx_op(const_cast(__ptr), UMTX_OP_WAKE, __notify_one ? 1 : INT_MAX, nullptr, nullptr); } @@ -196,14 +196,14 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo // Baseline is just a timed backoff template -static void __libcpp_platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { __libcpp_thread_poll_with_backoff( [=]() -> bool { return !std::memcmp(const_cast(__ptr), __val, _Size); }, __libcpp_timed_backoff_policy()); } template -static void __libcpp_platform_wake_by_address(void const volatile*, bool) {} +static void __platform_wake_by_address(void const volatile*, bool) {} #endif // __linux__ @@ -219,7 +219,7 @@ static void __contention_notify( __cxx_atomic_contention_t volatile* __waiter_count, void const volatile* __address_to_notify, bool __notify_one) { if (0 != __cxx_atomic_load(__waiter_count, memory_order_seq_cst)) // We only call 'wake' if we consumed a contention bit here. - __libcpp_platform_wake_by_address<_Size>(__address_to_notify, __notify_one); + __platform_wake_by_address<_Size>(__address_to_notify, __notify_one); } template @@ -231,7 +231,7 @@ static void __contention_wait(__cxx_atomic_contention_t volatile* __waiter_count // There are no platform guarantees of a memory barrier in the platform wait implementation __cxx_atomic_thread_fence(memory_order_seq_cst); // We sleep as long as the monitored value hasn't changed. - __libcpp_platform_wait_on_address<_Size>(__address_to_wait, __old_value); + __platform_wait_on_address<_Size>(__address_to_wait, __old_value); __cxx_atomic_fetch_sub(__waiter_count, __cxx_contention_t(1), memory_order_release); } @@ -289,41 +289,40 @@ static void __atomic_notify_global_table(void const volatile* __location) { // ============================= // global -_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor_global(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __atomic_monitor_global(void const volatile* __location) noexcept { auto const __entry = __get_global_contention_state(__location); return __cxx_atomic_load(&__entry->__platform_state, memory_order_acquire); } _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_global_table(void const volatile* __location, __cxx_contention_t __old_value) noexcept { +__atomic_wait_global_table(void const volatile* __location, __cxx_contention_t __old_value) noexcept { auto const __entry = __get_global_contention_state(__location); __contention_wait( &__entry->__waiter_count, &__entry->__platform_state, &__old_value); } -_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_global_table(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_global_table(void const volatile* __location) noexcept { __atomic_notify_global_table(__location); } -_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_global_table(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_global_table(void const volatile* __location) noexcept { __atomic_notify_global_table(__location); } // native template -_LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_wait_native(void const volatile* __address, void const* __old_value) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_wait_native(void const volatile* __address, void const* __old_value) noexcept { __contention_wait<_Size>(__get_native_waiter_count(__address), __address, __old_value); } template -_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native(void const volatile* __location) noexcept { __contention_notify<_Size>(__get_native_waiter_count(__location), __location, true); } template -_LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(void const volatile* __location) noexcept { __contention_notify<_Size>(__get_native_waiter_count(__location), __location, false); } @@ -334,25 +333,24 @@ _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native(void const vola #if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) # define _INSTANTIATE(_SIZE) \ - template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait_native<_SIZE>( \ - void const volatile*, void const*) noexcept; \ - template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_one_native<_SIZE>(void const volatile*) noexcept; \ - template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_notify_all_native<_SIZE>(void const volatile*) noexcept; + template _LIBCPP_EXPORTED_FROM_ABI void __atomic_wait_native<_SIZE>(void const volatile*, void const*) noexcept; \ + template _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native<_SIZE>(void const volatile*) noexcept; \ + template _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native<_SIZE>(void const volatile*) noexcept; -_LIBCPP_ATOMIC_WAIT_SIZES_LIST(_INSTANTIATE) +_LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_INSTANTIATE) # undef _INSTANTIATE #else // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE -template _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait_native( - void const volatile* __address, void const* __old_value) noexcept; +template _LIBCPP_EXPORTED_FROM_ABI void +__atomic_wait_native(void const volatile* __address, void const* __old_value) noexcept; template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_notify_one_native(void const volatile* __location) noexcept; +__atomic_notify_one_native(void const volatile* __location) noexcept; template _LIBCPP_EXPORTED_FROM_ABI void -__libcpp_atomic_notify_all_native(void const volatile* __location) noexcept; +__atomic_notify_all_native(void const volatile* __location) noexcept; #endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE @@ -361,33 +359,36 @@ __libcpp_atomic_notify_all_native(void const volatil // ============================================================= _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile* __location) noexcept { - __libcpp_atomic_notify_one_global_table(__location); + __atomic_notify_global_table(__location); } _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile* __location) noexcept { - __libcpp_atomic_notify_all_global_table(__location); + __atomic_notify_global_table(__location); } _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile* __location) noexcept { - return __libcpp_atomic_monitor_global(__location); + auto const __entry = __get_global_contention_state(__location); + return __cxx_atomic_load(&__entry->__platform_state, memory_order_acquire); } _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(void const volatile* __location, __cxx_contention_t __old_value) noexcept { - __libcpp_atomic_wait_global_table(__location, __old_value); + auto const __entry = __get_global_contention_state(__location); + __contention_wait( + &__entry->__waiter_count, &__entry->__platform_state, &__old_value); } _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile* __location) noexcept { - __libcpp_atomic_notify_one_native(__location); + __contention_notify(__get_native_waiter_count(__location), __location, true); } _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile* __location) noexcept { - __libcpp_atomic_notify_all_native(__location); + __contention_notify(__get_native_waiter_count(__location), __location, false); } _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile* __location, __cxx_contention_t __old_value) noexcept { - __libcpp_atomic_wait_native(__location, &__old_value); + __contention_wait(__get_native_waiter_count(__location), __location, &__old_value); } // this function is even unused in the old ABI From 59be9f649eff059efd30a0fe16a040e0ea80a9b1 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 2 Nov 2025 15:28:33 +0000 Subject: [PATCH 15/26] abi --- libcxx/lib/abi/CHANGELOG.TXT | 7 +++++++ ...arwin.libcxxabi.v1.stable.exceptions.nonew.abilist | 11 +++++++++-- ...oid21.libcxxabi.v1.stable.exceptions.nonew.abilist | 11 +++++++++-- ...oid21.libcxxabi.v1.stable.exceptions.nonew.abilist | 11 +++++++++-- ...eebsd.libcxxabi.v1.stable.exceptions.nonew.abilist | 11 +++++++++-- ...x-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist | 11 +++++++++-- 6 files changed, 52 insertions(+), 10 deletions(-) diff --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT index 968dc7a22a8c7..a52b29b56f584 100644 --- a/libcxx/lib/abi/CHANGELOG.TXT +++ b/libcxx/lib/abi/CHANGELOG.TXT @@ -26,6 +26,13 @@ Version 22.0 Symbol removed: _ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE Symbol removed: _ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE Symbol removed: _ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE + Symbol added: _ZNSt3__123__atomic_monitor_globalEPVKv + Symbol added: _ZNSt3__126__atomic_wait_global_tableEPVKvi + Symbol added: _ZNSt3__126__atomic_notify_one_nativeILm4EEEvPVKv + Symbol added: _ZNSt3__132__atomic_notify_all_global_tableEPVKv + Symbol added: _ZNSt3__120__atomic_wait_nativeILm4EEEvPVKvPKv + Symbol added: _ZNSt3__126__atomic_notify_all_nativeILm4EEEvPVKv + Symbol added: _ZNSt3__132__atomic_notify_one_global_tableEPVKv ------------ Version 21.0 diff --git a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist index 3a1d8950c2db0..ecb448d4672b9 100644 --- a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -534,6 +534,7 @@ {'is_defined': True, 'name': '__ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNKSt3__115error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNKSt3__117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} @@ -1125,6 +1126,7 @@ {'is_defined': True, 'name': '__ZNSt3__112system_errorD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112system_errorD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__112system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE11__read_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE12__write_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj', 'type': 'FUNC'} @@ -1305,7 +1307,6 @@ {'is_defined': True, 'name': '__ZNSt3__113shared_futureIvED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__113shared_futureIvED2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__113shared_futureIvEaSERKS1_', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__114__num_get_base5__srcE', 'size': 0, 'type': 'OBJECT'} {'is_defined': True, 'name': '__ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'} @@ -1508,7 +1509,6 @@ {'is_defined': True, 'name': '__ZNSt3__117bad_function_callD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__117bad_function_callD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__117bad_function_callD2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNKSt3__117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__117iostream_categoryEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} @@ -1558,6 +1558,7 @@ {'is_defined': True, 'name': '__ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__120__atomic_wait_nativeILm8EEEvPVKvPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEEx', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__120__libcpp_atomic_waitEPVKvx', 'type': 'FUNC'} @@ -1571,6 +1572,7 @@ {'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'} @@ -1578,9 +1580,14 @@ {'is_defined': True, 'name': '__ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__126__atomic_notify_all_nativeILm8EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__126__atomic_notify_one_nativeILm8EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__126__atomic_wait_global_tableEPVKvx', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__13cinE', 'size': 0, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist index 313de84df20e8..2083fbf274a61 100644 --- a/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -170,6 +170,7 @@ {'is_defined': True, 'name': '_ZNKSt6__ndk115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk115error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt6__ndk117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} @@ -761,6 +762,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk112system_errorD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk112system_errorD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk112system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk113__hash_memoryEPKvj', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113basic_filebufIcNS_11char_traitsIcEEE11__read_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113basic_filebufIcNS_11char_traitsIcEEE12__write_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj', 'type': 'FUNC'} @@ -941,7 +943,6 @@ {'is_defined': True, 'name': '_ZNSt6__ndk113shared_futureIvED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113shared_futureIvED2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113shared_futureIvEaSERKS1_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk113__hash_memoryEPKvj', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk114__num_get_base5__srcE', 'size': 33, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZNSt6__ndk114__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'} @@ -1144,7 +1145,6 @@ {'is_defined': True, 'name': '_ZNSt6__ndk117bad_function_callD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117bad_function_callD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117bad_function_callD2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNKSt6__ndk117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117iostream_categoryEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} @@ -1194,6 +1194,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk120__atomic_wait_nativeILj4EEEvPVKvPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'} @@ -1207,6 +1208,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} @@ -1214,9 +1216,14 @@ {'is_defined': True, 'name': '_ZNSt6__ndk123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_all_nativeILj4EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_one_nativeILj4EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_wait_global_tableEPVKvi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk134__construct_barrier_algorithm_baseERi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk13cinE', 'size': 148, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist index 1be7d8a2ac20b..58e578a6eb897 100644 --- a/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -170,6 +170,7 @@ {'is_defined': True, 'name': '_ZNKSt6__ndk115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk115error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt6__ndk117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt6__ndk117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} @@ -761,6 +762,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk112system_errorD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk112system_errorD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk112system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113basic_filebufIcNS_11char_traitsIcEEE11__read_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113basic_filebufIcNS_11char_traitsIcEEE12__write_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj', 'type': 'FUNC'} @@ -941,7 +943,6 @@ {'is_defined': True, 'name': '_ZNSt6__ndk113shared_futureIvED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113shared_futureIvED2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk113shared_futureIvEaSERKS1_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk114__num_get_base5__srcE', 'size': 33, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZNSt6__ndk114__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'} @@ -1144,7 +1145,6 @@ {'is_defined': True, 'name': '_ZNSt6__ndk117bad_function_callD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117bad_function_callD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117bad_function_callD2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNKSt6__ndk117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117iostream_categoryEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} @@ -1194,6 +1194,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk120__atomic_wait_nativeILm4EEEvPVKvPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'} @@ -1207,6 +1208,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} @@ -1214,9 +1216,14 @@ {'is_defined': True, 'name': '_ZNSt6__ndk123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_all_nativeILm4EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_one_nativeILm4EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_wait_global_tableEPVKvi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk13cinE', 'size': 280, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist index 40ae625d3bd69..ed228fffdb938 100644 --- a/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -227,6 +227,7 @@ {'is_defined': True, 'name': '_ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__115error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} @@ -775,6 +776,7 @@ {'is_defined': True, 'name': '_ZNSt3__112system_errorD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112system_errorD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE11__read_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE12__write_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj', 'type': 'FUNC'} @@ -955,7 +957,6 @@ {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__114__num_get_base5__srcE', 'size': 33, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'} @@ -1158,7 +1159,6 @@ {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117iostream_categoryEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} @@ -1208,6 +1208,7 @@ {'is_defined': True, 'name': '_ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm8EEEvPVKvPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEEl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvl', 'type': 'FUNC'} @@ -1221,6 +1222,7 @@ {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'type': 'FUNC'} @@ -1228,9 +1230,14 @@ {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm8EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm8EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPVKvl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__13cinE', 'size': 400, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist index 90166073b135f..c6d5510ec0029 100644 --- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -225,6 +225,7 @@ {'is_defined': True, 'name': '_ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__115error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} @@ -773,6 +774,7 @@ {'is_defined': True, 'name': '_ZNSt3__112system_errorD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112system_errorD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE11__read_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE12__write_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj', 'type': 'FUNC'} @@ -953,7 +955,6 @@ {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__114__num_get_base5__srcE', 'size': 33, 'type': 'OBJECT'} {'is_defined': True, 'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'type': 'FUNC'} @@ -1156,7 +1157,6 @@ {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117iostream_categoryEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} @@ -1206,6 +1206,7 @@ {'is_defined': True, 'name': '_ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm4EEEvPVKvPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'} @@ -1219,6 +1220,7 @@ {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} @@ -1226,9 +1228,14 @@ {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm4EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm4EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPVKvi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__13cinE', 'size': 280, 'type': 'OBJECT'} From e5df955d2c405a1a57931098f78f969531fa606b Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 2 Nov 2025 16:56:22 +0000 Subject: [PATCH 16/26] ci --- ...gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist | 11 +++++++++-- libcxx/src/atomic.cpp | 2 ++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist index 5855c17cf11ed..e70ff1480942f 100644 --- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist @@ -196,6 +196,7 @@ {'is_defined': True, 'name': '_ZNKSt3__115basic_streambufIwNS_11char_traitsIwEEE6getlocEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__115error_condition7messageEv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE11do_groupingEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_neg_formatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNKSt3__117moneypunct_bynameIcLb0EE13do_pos_formatEv', 'type': 'FUNC'} @@ -744,6 +745,7 @@ {'is_defined': True, 'name': '_ZNSt3__112system_errorD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112system_errorD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__112system_errorD2Ev', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE11__read_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE12__write_modeEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113basic_filebufIcNS_11char_traitsIcEEE4openEPKcj', 'type': 'FUNC'} @@ -923,7 +925,6 @@ {'is_defined': True, 'name': '_ZNSt3__113random_deviceclEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__114__num_get_base5__srcE', 'size': 33, 'type': 'OBJECT'} @@ -1127,7 +1128,6 @@ {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD0Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117bad_function_callD2Ev', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117iostream_categoryEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'type': 'FUNC'} @@ -1177,6 +1177,7 @@ {'is_defined': True, 'name': '_ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm4EEEvPVKvPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'} @@ -1190,6 +1191,7 @@ {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} @@ -1197,9 +1199,14 @@ {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm4EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm4EEEvPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPVKvi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__13cinE', 'size': 280, 'type': 'OBJECT'} diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index 9f9b6a8a4e7f9..5e6d597862c7f 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -5,6 +5,8 @@ // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // //===----------------------------------------------------------------------===// + +#include <__thread/timed_backoff_policy.h> #include #include #include From 6b6f0189d1fa29bf41e262c6875ab622fc0eef76 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 8 Nov 2025 09:06:34 +0000 Subject: [PATCH 17/26] fallback --- libcxx/src/atomic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index 5e6d597862c7f..f31037c624dc2 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -200,7 +200,7 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo template static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { __libcpp_thread_poll_with_backoff( - [=]() -> bool { return !std::memcmp(const_cast(__ptr), __val, _Size); }, + [=]() -> bool { return std::memcmp(const_cast(__ptr), __val, _Size) != 0; }, __libcpp_timed_backoff_policy()); } From 1729b7a8afe948bcdad14a8303b5cbefb1cd3a25 Mon Sep 17 00:00:00 2001 From: Hui Date: Sat, 15 Nov 2025 15:23:57 +0000 Subject: [PATCH 18/26] Update libcxx/include/__atomic/atomic_sync.h Co-authored-by: Louis Dionne --- libcxx/include/__atomic/atomic_sync.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index 5354db8bb9609..a3bea34bc66dd 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -274,6 +274,7 @@ _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) { } # else // _LIBCPP_AVAILABILITY_HAS_NEW_SYNC + template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); From 114c868d04123c83621ef71d8870cbbfefaad392 Mon Sep 17 00:00:00 2001 From: Hui Date: Sat, 15 Nov 2025 15:24:28 +0000 Subject: [PATCH 19/26] Update libcxx/include/__atomic/atomic_sync.h Co-authored-by: Louis Dionne --- libcxx/include/__atomic/atomic_sync.h | 1 + 1 file changed, 1 insertion(+) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index a3bea34bc66dd..acdbf3928f04e 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -286,6 +286,7 @@ _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); std::__cxx_atomic_notify_all(__atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); } + # endif # else // _LIBCPP_HAS_THREADS From 8c5cbf5b7683e8df4884b440dd1ab234c9c1e837 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 15 Nov 2025 16:03:15 +0000 Subject: [PATCH 20/26] rebase --- libcxx/include/__atomic/atomic_sync.h | 2 ++ libcxx/include/__atomic/contention_t.h | 2 ++ libcxx/src/atomic.cpp | 17 ++++++++++------- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index acdbf3928f04e..e9b6be1b81ca1 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -114,6 +114,8 @@ _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all _APPLY(8) # elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8 # define _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_APPLY) _APPLY(8) +# elif defined(_WIN32) +# define _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_APPLY) _APPLY(8) # else # define _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_APPLY) _APPLY(sizeof(__cxx_contention_t)) # endif // __linux__ diff --git a/libcxx/include/__atomic/contention_t.h b/libcxx/include/__atomic/contention_t.h index 21c8fcf7b2d1c..b44d938661691 100644 --- a/libcxx/include/__atomic/contention_t.h +++ b/libcxx/include/__atomic/contention_t.h @@ -29,6 +29,8 @@ using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; # elif defined(_AIX) && !defined(__64BIT__) using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; +#elif defined(_WIN32) +using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; # else using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; # endif // __linux__ diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index f31037c624dc2..fa83062c637cc 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -155,27 +155,30 @@ static void* win32_get_synch_api_function(const char* function_name) { return reinterpret_cast(GetProcAddress(module_handle, function_name)); } -static void -__libcpp_platform_wait_on_address(__cxx_atomic_contention_t const volatile* __ptr, __cxx_contention_t __val) { +template +static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { + static_assert(_Size == 8, "Can only wait on 8 bytes value"); // WaitOnAddress was added in Windows 8 (build 9200) static auto wait_on_address = reinterpret_cast( win32_get_synch_api_function("WaitOnAddress")); if (wait_on_address != nullptr) { - wait_on_address(const_cast<__cxx_atomic_contention_t*>(__ptr), &__val, sizeof(__val), INFINITE); + wait_on_address(const_cast(__ptr), &__val, _Size, INFINITE); } else { __libcpp_thread_poll_with_backoff( - [=]() -> bool { return !__cxx_nonatomic_compare_equal(__cxx_atomic_load(__ptr, memory_order_relaxed), __val); }, + [=]() -> bool { return std::memcmp(const_cast(__ptr), __val, _Size) != 0; }, __libcpp_timed_backoff_policy()); } } -static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const volatile* __ptr, bool __notify_one) { +template +static void __platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { + static_assert(_Size == 8, "Can only wake up on 8 bytes value"); if (__notify_one) { // WakeByAddressSingle was added in Windows 8 (build 9200) static auto wake_by_address_single = reinterpret_cast(win32_get_synch_api_function("WakeByAddressSingle")); if (wake_by_address_single != nullptr) { - wake_by_address_single(const_cast<__cxx_atomic_contention_t*>(__ptr)); + wake_by_address_single(const_cast(__ptr)); } else { // The fallback implementation of waking does nothing, as the fallback wait implementation just does polling, so // there's nothing to do here. @@ -185,7 +188,7 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo static auto wake_by_address_all = reinterpret_cast(win32_get_synch_api_function("WakeByAddressAll")); if (wake_by_address_all != nullptr) { - wake_by_address_all(const_cast<__cxx_atomic_contention_t*>(__ptr)); + wake_by_address_all(const_cast(__ptr)); } else { // The fallback implementation of waking does nothing, as the fallback wait implementation just does polling, so // there's nothing to do here. From 94a5d685c22d543e1eebd1be6d6e5e09037a1199 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 15 Nov 2025 16:45:18 +0000 Subject: [PATCH 21/26] address comments --- libcxx/docs/ABIGuarantees.rst | 5 +- libcxx/include/__atomic/atomic_sync.h | 40 ++++++----- libcxx/include/__atomic/contention_t.h | 6 +- libcxx/lib/abi/CHANGELOG.TXT | 7 ++ libcxx/src/atomic.cpp | 96 ++++++++++++++------------ 5 files changed, 90 insertions(+), 64 deletions(-) diff --git a/libcxx/docs/ABIGuarantees.rst b/libcxx/docs/ABIGuarantees.rst index 9fa60b3fbdc09..e680f5429880e 100644 --- a/libcxx/docs/ABIGuarantees.rst +++ b/libcxx/docs/ABIGuarantees.rst @@ -209,7 +209,10 @@ resulting in an ABI break. ------------------------------------------ This flag changes the implementation of ``atomic::wait()`` and ``atomic::notify_one()/notify_all()`` to use the native atomic wait/notify operations on platforms that support them based on the size of the atomic type, instead -of the type itself. This means for example that a type with ``sizeof(T) == 4`` on Linux that doesn't have padding bytes would be able to use the underlying platform's atomic wait primitive, which is otherwise only used for ``int32_t``. Since the whole program must use the same implementation for correctness, changing this is an ABI break since libc++ supports linking against TUs that were compiled against older versions of the library. +of the type itself. This means for example that a type with ``sizeof(T) == 4`` on Linux that doesn't have padding +bytes would be able to use the underlying platform's atomic wait primitive, which is otherwise only used for ``int32_t``. +Since the whole program must use the same implementation for correctness, changing this is an ABI break since libc++ +supports linking against TUs that were compiled against older versions of the library. inline namespaces diff --git a/libcxx/include/__atomic/atomic_sync.h b/libcxx/include/__atomic/atomic_sync.h index e9b6be1b81ca1..3cbea1fe3e66b 100644 --- a/libcxx/include/__atomic/atomic_sync.h +++ b/libcxx/include/__atomic/atomic_sync.h @@ -62,6 +62,8 @@ struct __atomic_waitable< _Tp, #if _LIBCPP_STD_VER >= 20 # if _LIBCPP_HAS_THREADS +# if !_LIBCPP_AVAILABILITY_HAS_NEW_SYNC + // old dylib interface kept for backwards compatibility _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile*) _NOEXCEPT; @@ -74,37 +76,36 @@ _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(__cxx_atomic_contention_t const volatile*) _NOEXCEPT; _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile*, __cxx_contention_t) _NOEXCEPT; +# endif // !_LIBCPP_AVAILABILITY_HAS_NEW_SYNC // new dylib interface // return the global contention state's current value for the address _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t -__atomic_monitor_global(void const volatile* __address) _NOEXCEPT; +__atomic_monitor_global(void const* __address) _NOEXCEPT; // wait on the global contention state to be changed from the given value for the address _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__atomic_wait_global_table(void const volatile* __address, __cxx_contention_t __monitor_value) _NOEXCEPT; +__atomic_wait_global_table(void const* __address, __cxx_contention_t __monitor_value) _NOEXCEPT; // notify one waiter waiting on the global contention state for the address -_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__atomic_notify_one_global_table(void const volatile*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_global_table(void const*) _NOEXCEPT; // notify all waiters waiting on the global contention state for the address -_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__atomic_notify_all_global_table(void const volatile*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_global_table(void const*) _NOEXCEPT; // wait on the address directly with the native platform wait template _LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void -__atomic_wait_native(void const volatile* __address, void const* __old_value) _NOEXCEPT; +__atomic_wait_native(void const* __address, void const* __old_value) _NOEXCEPT; // notify one waiter waiting on the address directly with the native platform wait template -_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native(const volatile void*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native(const void*) _NOEXCEPT; // notify all waiters waiting on the address directly with the native platform wait template -_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(const volatile void*) _NOEXCEPT; +_LIBCPP_AVAILABILITY_NEW_SYNC _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(const void*) _NOEXCEPT; # ifdef __linux__ # define _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_APPLY) _APPLY(4) @@ -160,7 +161,8 @@ struct __atomic_wait_backoff_impl { _LIBCPP_HIDE_FROM_ABI bool operator()(chrono::nanoseconds __elapsed) const { if (__elapsed > chrono::microseconds(4)) { - auto __contention_address = __waitable_traits::__atomic_contention_address(__a_); + auto __contention_address = const_cast( + static_cast(__waitable_traits::__atomic_contention_address(__a_))); if constexpr (__has_native_atomic_wait<__value_type>) { auto __atomic_value = __waitable_traits::__atomic_load(__a_, __order_); @@ -253,12 +255,13 @@ template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_one(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); using __value_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__value_type; + using __waitable_traits _LIBCPP_NODEBUG = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >; + auto __contention_address = + const_cast(static_cast(__waitable_traits::__atomic_contention_address(__a))); if constexpr (__has_native_atomic_wait<__value_type>) { - std::__atomic_notify_one_native( - __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + std::__atomic_notify_one_native(__contention_address); } else { - std::__atomic_notify_one_global_table( - __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + std::__atomic_notify_one_global_table(__contention_address); } } @@ -266,12 +269,13 @@ template _LIBCPP_HIDE_FROM_ABI void __atomic_notify_all(const _AtomicWaitable& __a) { static_assert(__atomic_waitable<_AtomicWaitable>::value, ""); using __value_type _LIBCPP_NODEBUG = typename __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__value_type; + using __waitable_traits _LIBCPP_NODEBUG = __atomic_waitable_traits<__decay_t<_AtomicWaitable> >; + auto __contention_address = + const_cast(static_cast(__waitable_traits::__atomic_contention_address(__a))); if constexpr (__has_native_atomic_wait<__value_type>) { - std::__atomic_notify_all_native( - __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + std::__atomic_notify_all_native(__contention_address); } else { - std::__atomic_notify_all_global_table( - __atomic_waitable_traits<__decay_t<_AtomicWaitable> >::__atomic_contention_address(__a)); + std::__atomic_notify_all_global_table(__contention_address); } } diff --git a/libcxx/include/__atomic/contention_t.h b/libcxx/include/__atomic/contention_t.h index b44d938661691..b7e370439e67a 100644 --- a/libcxx/include/__atomic/contention_t.h +++ b/libcxx/include/__atomic/contention_t.h @@ -19,6 +19,10 @@ _LIBCPP_BEGIN_NAMESPACE_STD +// The original definition of `__cxx_contention_t` seemed a bit arbitrary. +// When we enable the _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE ABI, +// use definitions that are based on what the underlying platform supports +// instead. #if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) # ifdef __linux__ @@ -29,7 +33,7 @@ using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; # elif defined(_AIX) && !defined(__64BIT__) using __cxx_contention_t _LIBCPP_NODEBUG = int32_t; -#elif defined(_WIN32) +# elif defined(_WIN32) using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; # else using __cxx_contention_t _LIBCPP_NODEBUG = int64_t; diff --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT index a52b29b56f584..e8fe7eceffedb 100644 --- a/libcxx/lib/abi/CHANGELOG.TXT +++ b/libcxx/lib/abi/CHANGELOG.TXT @@ -26,6 +26,13 @@ Version 22.0 Symbol removed: _ZNSt3__118__time_get_storageIcE9__analyzeEcRKNS_5ctypeIcEE Symbol removed: _ZNSt3__118__time_get_storageIwE4initERKNS_5ctypeIwEE Symbol removed: _ZNSt3__118__time_get_storageIwE9__analyzeEcRKNS_5ctypeIwEE + +* [libc++] Allows any types of size 4 and 8 to use native platform ulock_wait + + This patch added symbols for platform wait functions with the size of the type + + All platforms + ------------- Symbol added: _ZNSt3__123__atomic_monitor_globalEPVKv Symbol added: _ZNSt3__126__atomic_wait_global_tableEPVKvi Symbol added: _ZNSt3__126__atomic_notify_one_nativeILm4EEEvPVKv diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index fa83062c637cc..c0d7a65ca01f7 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -62,7 +63,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD #ifdef __linux__ template -static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const* __ptr, void const* __val) { static_assert(_Size == 4, "Can only wait on 4 bytes value"); char buffer[_Size]; std::memcpy(&buffer, const_cast(__val), _Size); @@ -71,7 +72,7 @@ static void __platform_wait_on_address(void const volatile* __ptr, void const* _ } template -static void __platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { +static void __platform_wake_by_address(void const* __ptr, bool __notify_one) { static_assert(_Size == 4, "Can only wake up on 4 bytes value"); _LIBCPP_FUTEX(__ptr, FUTEX_WAKE_PRIVATE, __notify_one ? 1 : INT_MAX, 0, 0, 0); } @@ -88,7 +89,7 @@ extern "C" int __ulock_wake(uint32_t operation, void* addr, uint64_t wake_value) # define ULF_WAKE_ALL 0x00000100 template -static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const* __ptr, void const* __val) { static_assert(_Size == 8 || _Size == 4, "Can only wait on 8 bytes or 4 bytes value"); char buffer[_Size]; std::memcpy(&buffer, const_cast(__val), _Size); @@ -99,7 +100,7 @@ static void __platform_wait_on_address(void const volatile* __ptr, void const* _ } template -static void __platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { +static void __platform_wake_by_address(void const* __ptr, bool __notify_one) { static_assert(_Size == 8 || _Size == 4, "Can only wake up on 8 bytes or 4 bytes value"); if constexpr (_Size == 4) @@ -116,7 +117,7 @@ static void __platform_wake_by_address(void const volatile* __ptr, bool __notify */ template -static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const* __ptr, void const* __val) { static_assert(_Size == 8, "Can only wait on 8 bytes value"); char buffer[_Size]; std::memcpy(&buffer, const_cast(__val), _Size); @@ -124,7 +125,7 @@ static void __platform_wait_on_address(void const volatile* __ptr, void const* _ } template -static void __platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { +static void __platform_wake_by_address(void const* __ptr, bool __notify_one) { static_assert(_Size == 8, "Can only wake up on 8 bytes value"); _umtx_op(const_cast(__ptr), UMTX_OP_WAKE, __notify_one ? 1 : INT_MAX, nullptr, nullptr); } @@ -156,11 +157,11 @@ static void* win32_get_synch_api_function(const char* function_name) { } template -static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const* __ptr, void const* __val) { static_assert(_Size == 8, "Can only wait on 8 bytes value"); // WaitOnAddress was added in Windows 8 (build 9200) - static auto wait_on_address = reinterpret_cast( - win32_get_synch_api_function("WaitOnAddress")); + static auto wait_on_address = + reinterpret_cast(win32_get_synch_api_function("WaitOnAddress")); if (wait_on_address != nullptr) { wait_on_address(const_cast(__ptr), &__val, _Size, INFINITE); } else { @@ -171,7 +172,7 @@ static void __platform_wait_on_address(void const volatile* __ptr, void const* _ } template -static void __platform_wake_by_address(void const volatile* __ptr, bool __notify_one) { +static void __platform_wake_by_address(void const* __ptr, bool __notify_one) { static_assert(_Size == 8, "Can only wake up on 8 bytes value"); if (__notify_one) { // WakeByAddressSingle was added in Windows 8 (build 9200) @@ -201,14 +202,14 @@ static void __platform_wake_by_address(void const volatile* __ptr, bool __notify // Baseline is just a timed backoff template -static void __platform_wait_on_address(void const volatile* __ptr, void const* __val) { +static void __platform_wait_on_address(void const* __ptr, void const* __val) { __libcpp_thread_poll_with_backoff( [=]() -> bool { return std::memcmp(const_cast(__ptr), __val, _Size) != 0; }, __libcpp_timed_backoff_policy()); } template -static void __platform_wake_by_address(void const volatile*, bool) {} +static void __platform_wake_by_address(void const*, bool) {} #endif // __linux__ @@ -220,17 +221,16 @@ static void __platform_wake_by_address(void const volatile*, bool) {} the same atomic, we try to detect contention to avoid spuriously calling the platform. */ template -static void __contention_notify( - __cxx_atomic_contention_t volatile* __waiter_count, void const volatile* __address_to_notify, bool __notify_one) { +static void +__contention_notify(__cxx_atomic_contention_t* __waiter_count, void const* __address_to_notify, bool __notify_one) { if (0 != __cxx_atomic_load(__waiter_count, memory_order_seq_cst)) // We only call 'wake' if we consumed a contention bit here. __platform_wake_by_address<_Size>(__address_to_notify, __notify_one); } template -static void __contention_wait(__cxx_atomic_contention_t volatile* __waiter_count, - void const volatile* __address_to_wait, - void const* __old_value) { +static void +__contention_wait(__cxx_atomic_contention_t* __waiter_count, void const* __address_to_wait, void const* __old_value) { __cxx_atomic_fetch_add(__waiter_count, __cxx_contention_t(1), memory_order_relaxed); // https://llvm.org/PR109290 // There are no platform guarantees of a memory barrier in the platform wait implementation @@ -240,15 +240,17 @@ static void __contention_wait(__cxx_atomic_contention_t volatile* __waiter_count __cxx_atomic_fetch_sub(__waiter_count, __cxx_contention_t(1), memory_order_release); } -#if defined(__APPLE__) && defined(__aarch64__) -constexpr size_t __cache_line_size = 128; +#if defined(__GCC_DESTRUCTIVE_SIZE) && defined(__GCC_CONSTRUCTIVE_SIZE) +static constexpr size_t __cache_line_size = std::hardware_constructive_interference_size; +#elif defined(__APPLE__) && defined(__aarch64__) +static constexpr size_t __cache_line_size = 128; #else -constexpr size_t __cache_line_size = 64; +static constexpr size_t __cache_line_size = 64; #endif static constexpr size_t __contention_table_size = (1 << 8); /* < there's no magic in this number */ -static constexpr hash __contention_hasher; +static constexpr hash __contention_hasher; // Waiter count table for all atomics with the correct size that use itself as the wait/notify address. @@ -259,7 +261,7 @@ struct alignas(__cache_line_size) /* aim to avoid false sharing */ __contention static __contention_state_native __contention_table_native[__contention_table_size]; -static __cxx_atomic_contention_t* __get_native_waiter_count(void const volatile* p) { +static __cxx_atomic_contention_t* __get_native_waiter_count(void const* p) { return &__contention_table_native[__contention_hasher(p) & (__contention_table_size - 1)].__waiter_count; } @@ -274,14 +276,14 @@ struct alignas(__cache_line_size) /* aim to avoid false sharing */ __contention static __contention_state_global __contention_table_global[__contention_table_size]; -static __contention_state_global* __get_global_contention_state(void const volatile* p) { +static __contention_state_global* __get_global_contention_state(void const* p) { return &__contention_table_global[__contention_hasher(p) & (__contention_table_size - 1)]; } /* When the incoming atomic is the wrong size for the platform wait size, need to launder the value sequence through an atomic from our table. */ -static void __atomic_notify_global_table(void const volatile* __location) { +static void __atomic_notify_global_table(void const* __location) { auto const __entry = __get_global_contention_state(__location); // The value sequence laundering happens on the next line below. __cxx_atomic_fetch_add(&__entry->__platform_state, __cxx_contention_t(1), memory_order_seq_cst); @@ -294,40 +296,40 @@ static void __atomic_notify_global_table(void const volatile* __location) { // ============================= // global -_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __atomic_monitor_global(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __atomic_monitor_global(void const* __location) noexcept { auto const __entry = __get_global_contention_state(__location); return __cxx_atomic_load(&__entry->__platform_state, memory_order_acquire); } _LIBCPP_EXPORTED_FROM_ABI void -__atomic_wait_global_table(void const volatile* __location, __cxx_contention_t __old_value) noexcept { +__atomic_wait_global_table(void const* __location, __cxx_contention_t __old_value) noexcept { auto const __entry = __get_global_contention_state(__location); __contention_wait( &__entry->__waiter_count, &__entry->__platform_state, &__old_value); } -_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_global_table(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_global_table(void const* __location) noexcept { __atomic_notify_global_table(__location); } -_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_global_table(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_global_table(void const* __location) noexcept { __atomic_notify_global_table(__location); } // native template -_LIBCPP_EXPORTED_FROM_ABI void __atomic_wait_native(void const volatile* __address, void const* __old_value) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_wait_native(void const* __address, void const* __old_value) noexcept { __contention_wait<_Size>(__get_native_waiter_count(__address), __address, __old_value); } template -_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native(void const* __location) noexcept { __contention_notify<_Size>(__get_native_waiter_count(__location), __location, true); } template -_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(void const volatile* __location) noexcept { +_LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(void const* __location) noexcept { __contention_notify<_Size>(__get_native_waiter_count(__location), __location, false); } @@ -338,9 +340,9 @@ _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native(void const volatile* _ #if defined(_LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE) # define _INSTANTIATE(_SIZE) \ - template _LIBCPP_EXPORTED_FROM_ABI void __atomic_wait_native<_SIZE>(void const volatile*, void const*) noexcept; \ - template _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native<_SIZE>(void const volatile*) noexcept; \ - template _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native<_SIZE>(void const volatile*) noexcept; + template _LIBCPP_EXPORTED_FROM_ABI void __atomic_wait_native<_SIZE>(void const*, void const*) noexcept; \ + template _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_one_native<_SIZE>(void const*) noexcept; \ + template _LIBCPP_EXPORTED_FROM_ABI void __atomic_notify_all_native<_SIZE>(void const*) noexcept; _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_INSTANTIATE) @@ -349,13 +351,13 @@ _LIBCPP_NATIVE_PLATFORM_WAIT_SIZES(_INSTANTIATE) #else // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE template _LIBCPP_EXPORTED_FROM_ABI void -__atomic_wait_native(void const volatile* __address, void const* __old_value) noexcept; +__atomic_wait_native(void const* __address, void const* __old_value) noexcept; template _LIBCPP_EXPORTED_FROM_ABI void -__atomic_notify_one_native(void const volatile* __location) noexcept; +__atomic_notify_one_native(void const* __location) noexcept; template _LIBCPP_EXPORTED_FROM_ABI void -__atomic_notify_all_native(void const volatile* __location) noexcept; +__atomic_notify_all_native(void const* __location) noexcept; #endif // _LIBCPP_ABI_ATOMIC_WAIT_NATIVE_BY_SIZE @@ -364,36 +366,42 @@ __atomic_notify_all_native(void const volatile* __lo // ============================================================= _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(void const volatile* __location) noexcept { - __atomic_notify_global_table(__location); + __atomic_notify_global_table(const_cast(__location)); } _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(void const volatile* __location) noexcept { - __atomic_notify_global_table(__location); + __atomic_notify_global_table(const_cast(__location)); } _LIBCPP_EXPORTED_FROM_ABI __cxx_contention_t __libcpp_atomic_monitor(void const volatile* __location) noexcept { - auto const __entry = __get_global_contention_state(__location); + auto const __entry = __get_global_contention_state(const_cast(__location)); return __cxx_atomic_load(&__entry->__platform_state, memory_order_acquire); } _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(void const volatile* __location, __cxx_contention_t __old_value) noexcept { - auto const __entry = __get_global_contention_state(__location); + auto const __entry = __get_global_contention_state(const_cast(__location)); __contention_wait( &__entry->__waiter_count, &__entry->__platform_state, &__old_value); } _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_one(__cxx_atomic_contention_t const volatile* __location) noexcept { - __contention_notify(__get_native_waiter_count(__location), __location, true); + auto __location_cast = const_cast(static_cast(__location)); + __contention_notify( + __get_native_waiter_count(__location_cast), __location_cast, true); } _LIBCPP_EXPORTED_FROM_ABI void __cxx_atomic_notify_all(__cxx_atomic_contention_t const volatile* __location) noexcept { - __contention_notify(__get_native_waiter_count(__location), __location, false); + auto __location_cast = const_cast(static_cast(__location)); + __contention_notify( + __get_native_waiter_count(__location_cast), __location_cast, false); } _LIBCPP_EXPORTED_FROM_ABI void __libcpp_atomic_wait(__cxx_atomic_contention_t const volatile* __location, __cxx_contention_t __old_value) noexcept { - __contention_wait(__get_native_waiter_count(__location), __location, &__old_value); + auto __location_cast = const_cast(static_cast(__location)); + __contention_wait( + __get_native_waiter_count(__location_cast), __location_cast, &__old_value); } // this function is even unused in the old ABI From b92abf2592630a64bf343aaf1d48e61a1f91ad5a Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 15 Nov 2025 17:19:11 +0000 Subject: [PATCH 22/26] ci --- .../test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp b/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp index f606e933eeec7..2f3660f036ea7 100644 --- a/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp +++ b/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp @@ -41,7 +41,7 @@ int main(int, char**) { // This would hang forever if the bug is present, but the test will fail in a bounded amount of // time due to the timeout above. - std::__libcpp_atomic_wait(&ct, old_val); + std::__atomic_wait_native(&ct, &old_val); done = true; timeout_thread.join(); From 8dda22a7096ca28c8fd23607438200052e9d664c Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 15 Nov 2025 18:43:49 +0000 Subject: [PATCH 23/26] CI --- libcxx/lib/abi/CHANGELOG.TXT | 14 +++++++------- ...in.libcxxabi.v1.stable.exceptions.nonew.abilist | 14 +++++++------- ...21.libcxxabi.v1.stable.exceptions.nonew.abilist | 14 +++++++------- ...ix.libcxxabi.v1.stable.exceptions.nonew.abilist | 11 +++++++++-- ...ix.libcxxabi.v1.stable.exceptions.nonew.abilist | 11 +++++++++-- ...21.libcxxabi.v1.stable.exceptions.nonew.abilist | 14 +++++++------- ...sd.libcxxabi.v1.stable.exceptions.nonew.abilist | 14 +++++++------- ...nu.libcxxabi.v1.stable.exceptions.nonew.abilist | 14 +++++++------- 8 files changed, 60 insertions(+), 46 deletions(-) diff --git a/libcxx/lib/abi/CHANGELOG.TXT b/libcxx/lib/abi/CHANGELOG.TXT index e8fe7eceffedb..80b5adce1c2c0 100644 --- a/libcxx/lib/abi/CHANGELOG.TXT +++ b/libcxx/lib/abi/CHANGELOG.TXT @@ -33,13 +33,13 @@ Version 22.0 All platforms ------------- - Symbol added: _ZNSt3__123__atomic_monitor_globalEPVKv - Symbol added: _ZNSt3__126__atomic_wait_global_tableEPVKvi - Symbol added: _ZNSt3__126__atomic_notify_one_nativeILm4EEEvPVKv - Symbol added: _ZNSt3__132__atomic_notify_all_global_tableEPVKv - Symbol added: _ZNSt3__120__atomic_wait_nativeILm4EEEvPVKvPKv - Symbol added: _ZNSt3__126__atomic_notify_all_nativeILm4EEEvPVKv - Symbol added: _ZNSt3__132__atomic_notify_one_global_tableEPVKv + Symbol added: __ZNSt3__123__atomic_monitor_globalEPKv + Symbol added: __ZNSt3__126__atomic_wait_global_tableEPKvx + Symbol added: __ZNSt3__126__atomic_notify_one_nativeILm8EEEvPKv + Symbol added: __ZNSt3__132__atomic_notify_all_global_tableEPKv + Symbol added: __ZNSt3__120__atomic_wait_nativeILm8EEEvPKvS2_ + Symbol added: __ZNSt3__126__atomic_notify_all_nativeILm8EEEvPKv + Symbol added: __ZNSt3__132__atomic_notify_one_global_tableEPKv ------------ Version 21.0 diff --git a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist index ecb448d4672b9..09102437775c7 100644 --- a/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -1558,7 +1558,7 @@ {'is_defined': True, 'name': '__ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__120__atomic_wait_nativeILm8EEEvPVKvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__120__atomic_wait_nativeILm8EEEvPKvS2_', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEEx', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__120__libcpp_atomic_waitEPVKvx', 'type': 'FUNC'} @@ -1572,7 +1572,7 @@ {'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__123__atomic_monitor_globalEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'} @@ -1580,14 +1580,14 @@ {'is_defined': True, 'name': '__ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIxNS_22__cxx_atomic_base_implIxEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__126__atomic_notify_all_nativeILm8EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__126__atomic_notify_one_nativeILm8EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__126__atomic_wait_global_tableEPVKvx', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__126__atomic_notify_all_nativeILm8EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__126__atomic_notify_one_nativeILm8EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__126__atomic_wait_global_tableEPKvx', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '__ZNSt3__132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__132__atomic_notify_all_global_tableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '__ZNSt3__132__atomic_notify_one_global_tableEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '__ZNSt3__13cinE', 'size': 0, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist index 2083fbf274a61..881914d66ec70 100644 --- a/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/i686-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -1194,7 +1194,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk120__atomic_wait_nativeILj4EEEvPVKvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk120__atomic_wait_nativeILj4EEEvPKvS2_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'} @@ -1208,7 +1208,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk123__atomic_monitor_globalEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} @@ -1216,14 +1216,14 @@ {'is_defined': True, 'name': '_ZNSt6__ndk123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_all_nativeILj4EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_one_nativeILj4EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_wait_global_tableEPVKvi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_all_nativeILj4EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_one_nativeILj4EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_wait_global_tableEPKvi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_all_global_tableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_one_global_tableEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk134__construct_barrier_algorithm_baseERi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk13cinE', 'size': 148, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist index 99cde72885cf2..bce5dab507cad 100644 --- a/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/powerpc-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -96,6 +96,7 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE6do_outERPcPKwS5_RS5_S2_S2_S3_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthERPcPKcS5_m', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__115error_condition7messageEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__118__time_get_storageIcE15__do_date_orderEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__118__time_get_storageIwE15__do_date_orderEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -410,6 +411,7 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112system_errorD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112system_errorD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112system_errorD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113random_deviceD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -418,7 +420,6 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} -{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__114__num_get_base5__srcE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -503,7 +504,6 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117bad_function_callD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117bad_function_callD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117bad_function_callD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} -{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117iostream_categoryEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -559,6 +559,7 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexC2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -566,7 +567,10 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPKvi', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__13cinE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'} @@ -1705,7 +1709,10 @@ {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm4EEEvPKvS2_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm4EEEvPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm4EEEvPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__14__fs10filesystem16_FilesystemClock9is_steadyE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist index 577d6cf759a77..36eb5b85466e6 100644 --- a/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/powerpc64-ibm-aix.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -96,6 +96,7 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE6do_outERPcPKwS5_RS5_S2_S2_S3_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__115__codecvt_utf16IwLb1EE9do_lengthERPcPKcS5_m', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__115error_condition7messageEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__118__time_get_storageIcE15__do_date_orderEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__118__time_get_storageIwE15__do_date_orderEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__119__shared_weak_count13__get_deleterERKSt9type_info', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -410,6 +411,7 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112system_errorD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112system_errorD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__112system_errorD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113random_deviceC1ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113random_deviceC2ERKNS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113random_deviceD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -418,7 +420,6 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113shared_futureIvED2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113shared_futureIvEaSERKS1_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} -{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__113__hash_memoryEPKvm', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__114__num_get_base10__get_baseERNS_8ios_baseE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__114__num_get_base5__srcE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__114__num_put_base12__format_intEPcPKcbj', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -503,7 +504,6 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117bad_function_callD0Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117bad_function_callD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117bad_function_callD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} -{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNKSt3__117bad_function_call4whatEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117iostream_categoryEv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb0EE4initEPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__117moneypunct_bynameIcLb1EE4initEPKc', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -559,6 +559,7 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexC2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} @@ -566,7 +567,10 @@ {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPKvl', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'EXP', 'is_defined': True, 'name': '_ZNSt3__13cinE', 'storage_mapping_class': 'RW', 'type': 'OBJECT'} @@ -1705,7 +1709,10 @@ {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm8EEEvPKvS2_', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm8EEEvPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} +{'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm8EEEvPKv', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'storage_mapping_class': 'DS', 'type': 'FUNC'} {'import_export': 'wEXP', 'is_defined': True, 'name': '_ZNSt3__14__fs10filesystem16_FilesystemClock9is_steadyE', 'storage_mapping_class': 'RO', 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist index 58e578a6eb897..154b7cc9b24d9 100644 --- a/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-linux-android21.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -1194,7 +1194,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk120__atomic_wait_nativeILm4EEEvPVKvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk120__atomic_wait_nativeILm4EEEvPKvS2_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'} @@ -1208,7 +1208,7 @@ {'is_defined': True, 'name': '_ZNSt6__ndk121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk123__atomic_monitor_globalEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} @@ -1216,14 +1216,14 @@ {'is_defined': True, 'name': '_ZNSt6__ndk123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_all_nativeILm4EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_one_nativeILm4EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_wait_global_tableEPVKvi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_all_nativeILm4EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_notify_one_nativeILm4EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk126__atomic_wait_global_tableEPKvi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_all_global_tableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt6__ndk132__atomic_notify_one_global_tableEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt6__ndk13cinE', 'size': 280, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist index ed228fffdb938..685d2a45bf9e9 100644 --- a/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-freebsd.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -1208,7 +1208,7 @@ {'is_defined': True, 'name': '_ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm8EEEvPVKvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm8EEEvPKvS2_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEEl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvl', 'type': 'FUNC'} @@ -1222,7 +1222,7 @@ {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'type': 'FUNC'} @@ -1230,14 +1230,14 @@ {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIlNS_22__cxx_atomic_base_implIlEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm8EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm8EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPVKvl', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm8EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm8EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPKvl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__13cinE', 'size': 400, 'type': 'OBJECT'} diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist index c6d5510ec0029..5732ed77f8f67 100644 --- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.exceptions.nonew.abilist @@ -1206,7 +1206,7 @@ {'is_defined': True, 'name': '_ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm4EEEvPVKvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm4EEEvPKvS2_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'} @@ -1220,7 +1220,7 @@ {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} @@ -1228,14 +1228,14 @@ {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm4EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm4EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPVKvi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm4EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm4EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPKvi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__13cinE', 'size': 280, 'type': 'OBJECT'} From 4105e50e75514f28ae6885283210555105486164 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sat, 15 Nov 2025 20:13:04 +0000 Subject: [PATCH 24/26] ci --- ....libcxxabi.v1.stable.noexceptions.nonew.abilist | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist index e70ff1480942f..c7183c29e3d0f 100644 --- a/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist +++ b/libcxx/lib/abi/x86_64-unknown-linux-gnu.libcxxabi.v1.stable.noexceptions.nonew.abilist @@ -1177,7 +1177,7 @@ {'is_defined': True, 'name': '_ZNSt3__119__thread_local_dataEv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_istringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__119basic_ostringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEaSEOS5_', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm4EEEvPVKvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__120__atomic_wait_nativeILm4EEEvPKvS2_', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__get_collation_nameEPKc', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEEi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__120__libcpp_atomic_waitEPVKvi', 'type': 'FUNC'} @@ -1191,7 +1191,7 @@ {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD1Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__121recursive_timed_mutexD2Ev', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__122__libcpp_verbose_abortEPKcz', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__123__atomic_monitor_globalEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_allEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__cxx_atomic_notify_oneEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} @@ -1199,14 +1199,14 @@ {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKNS_17__cxx_atomic_implIiNS_22__cxx_atomic_base_implIiEEEE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__123__libcpp_atomic_monitorEPVKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__125notify_all_at_thread_exitERNS_18condition_variableENS_11unique_lockINS_5mutexEEE', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm4EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm4EEEvPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPVKvi', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_all_nativeILm4EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_notify_one_nativeILm4EEEvPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__126__atomic_wait_global_tableEPKvi', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIdEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__127__from_chars_floating_pointIfEENS_19__from_chars_resultIT_EEPKcS5_NS_12chars_formatE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__131__arrive_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseEh', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPVKv', 'type': 'FUNC'} -{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPVKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_all_global_tableEPKv', 'type': 'FUNC'} +{'is_defined': True, 'name': '_ZNSt3__132__atomic_notify_one_global_tableEPKv', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__132__destroy_barrier_algorithm_baseEPNS_24__barrier_algorithm_baseE', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__134__construct_barrier_algorithm_baseERl', 'type': 'FUNC'} {'is_defined': True, 'name': '_ZNSt3__13cinE', 'size': 280, 'type': 'OBJECT'} From 310400fea20e3b0faf2ecb581c8b74daab18fee9 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 16 Nov 2025 09:53:16 +0000 Subject: [PATCH 25/26] ci --- .../test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp b/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp index 2f3660f036ea7..ed2a8b0629120 100644 --- a/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp +++ b/libcxx/test/libcxx/atomics/atomics.syn/wait.issue_85107.pass.cpp @@ -41,7 +41,11 @@ int main(int, char**) { // This would hang forever if the bug is present, but the test will fail in a bounded amount of // time due to the timeout above. +#if _LIBCPP_AVAILABILITY_HAS_NEW_SYNC std::__atomic_wait_native(&ct, &old_val); +#else + std::__libcpp_atomic_wait(&ct, old_val); +#endif done = true; timeout_thread.join(); From 3959e166a63e55be070b00623c55db2a50df7e95 Mon Sep 17 00:00:00 2001 From: Hui Xie Date: Sun, 16 Nov 2025 14:59:56 +0000 Subject: [PATCH 26/26] debug windows --- libcxx/src/atomic.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp index c0d7a65ca01f7..d7fdf14d094ff 100644 --- a/libcxx/src/atomic.cpp +++ b/libcxx/src/atomic.cpp @@ -163,7 +163,7 @@ static void __platform_wait_on_address(void const* __ptr, void const* __val) { static auto wait_on_address = reinterpret_cast(win32_get_synch_api_function("WaitOnAddress")); if (wait_on_address != nullptr) { - wait_on_address(const_cast(__ptr), &__val, _Size, INFINITE); + wait_on_address(const_cast(__ptr), const_cast(__val), _Size, INFINITE); } else { __libcpp_thread_poll_with_backoff( [=]() -> bool { return std::memcmp(const_cast(__ptr), __val, _Size) != 0; },