[libcxx-commits] [libcxx] [libc++] Refactor the predicate taking variant of `__cxx_atomic_wait` (PR #80596)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Feb 16 06:42:35 PST 2024
Jan =?utf-8?q?Kokemüller?= <jan.kokemueller at gmail.com>,
Jan =?utf-8?q?Kokemüller?= <jan.kokemueller at gmail.com>,
Jan =?utf-8?q?Kokemüller?= <jan.kokemueller at gmail.com>,
Jan =?utf-8?q?Kokemüller?= <jan.kokemueller at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/80596 at github.com>
================
@@ -102,21 +135,19 @@ _LIBCPP_HIDE_FROM_ABI bool __cxx_nonatomic_compare_equal(_Tp const& __lhs, _Tp c
return std::memcmp(std::addressof(__lhs), std::addressof(__rhs), sizeof(_Tp)) == 0;
}
-template <class _Atp, class _Tp>
-struct __cxx_atomic_wait_test_fn_impl {
- _Atp* __a;
+template <class _Tp>
+struct __cxx_atomic_wait_poll_fn_impl {
----------------
ldionne wrote:
I would suggest renaming this to `__atomic_compare_equal_to` or something like that -- that's still not a great name but it is a bit more descriptive, and in the future we could probably write this as a lambda (which is what would really make this code easier to read).
https://github.com/llvm/llvm-project/pull/80596
More information about the libcxx-commits
mailing list