[libcxx-commits] [libcxx] [libc++] add shared_recursive_mutex api (PR #82466)
A. Jiang via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Feb 27 00:21:45 PST 2024
================
@@ -0,0 +1,122 @@
+#include <cassert>
+#include <shared_recursive_mutex>
+
+constexpr uint32_t SHARED_USER_MAX_CNT = UINT32_MAX;
+constexpr pthread_t THREAD_ID_NOEXIST = 0;
----------------
frederick-vs-ja wrote:
If it's intended to support non-pthread platforms, `__thread_id` should be used. But it's a bit unfortunate that it's default constructor is not constexpr, and I _think_ we can drop this constant and use `__thread_id{}` instead.
https://github.com/llvm/llvm-project/pull/82466
More information about the libcxx-commits
mailing list