[libcxx-commits] [libcxx] [libc++] Simplify definition of __libcpp_recursive_mutex_t (PR #147385)

Martin Storsjö via libcxx-commits libcxx-commits at lists.llvm.org
Mon Jul 7 13:50:28 PDT 2025


================
@@ -28,12 +28,10 @@ using __libcpp_timespec_t = ::timespec;
 typedef void* __libcpp_mutex_t;
 #define _LIBCPP_MUTEX_INITIALIZER 0
 
-#if defined(_M_IX86) || defined(__i386__) || defined(_M_ARM) || defined(__arm__)
-typedef void* __libcpp_recursive_mutex_t[6];
-#elif defined(_M_AMD64) || defined(__x86_64__) || defined(_M_ARM64) || defined(__aarch64__)
+#if defined(_WIN64)
 typedef void* __libcpp_recursive_mutex_t[5];
 #else
----------------
mstorsjo wrote:

I guess that would be to check for `_WIN32` too? That's mostly implicitly true everywhere here (that's the practical ifdef used for "windows", and this is a windows specific header), but if you want to keep the `#error` I guess we could keep such a check as well.

https://github.com/llvm/llvm-project/pull/147385


More information about the libcxx-commits mailing list