[libcxx-commits] [libcxx] 0fe1012 - [libc++] [FreeBSD] correct 64-bit test
Ed Maste via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Mar 1 18:22:24 PST 2023
Author: Ed Maste
Date: 2023-03-01T21:21:31-05:00
New Revision: 0fe1012f8ee2f05c7890dced58a4f700de44ec19
URL: https://github.com/llvm/llvm-project/commit/0fe1012f8ee2f05c7890dced58a4f700de44ec19
DIFF: https://github.com/llvm/llvm-project/commit/0fe1012f8ee2f05c7890dced58a4f700de44ec19.diff
LOG: [libc++] [FreeBSD] correct 64-bit test
Using __SIZEOF_LONG__ == 8 rather than __LP64__ is needed so we use umtx
on CHERI. I accidentally landed an older diff.
Fixes: 17ecbb3ea6ff0ae716dd524c0e2bf75a4815c95b
Added:
Modified:
libcxx/src/atomic.cpp
Removed:
################################################################################
diff --git a/libcxx/src/atomic.cpp b/libcxx/src/atomic.cpp
index 61e507d44f644..9a34210b6eecb 100644
--- a/libcxx/src/atomic.cpp
+++ b/libcxx/src/atomic.cpp
@@ -77,7 +77,7 @@ static void __libcpp_platform_wake_by_address(__cxx_atomic_contention_t const vo
const_cast<__cxx_atomic_contention_t*>(__ptr), 0);
}
-#elif defined(__FreeBSD__) && defined(__LP64__)
+#elif defined(__FreeBSD__) && __SIZEOF_LONG__ == 8
/*
* 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
More information about the libcxx-commits
mailing list