[libc-commits] [libc] [libc] Add an extension macro to get numerical thread id (PR #195202)
Schrodinger ZHU Yifan via libc-commits
libc-commits at lists.llvm.org
Fri May 1 08:51:15 PDT 2026
================
@@ -77,4 +79,7 @@
#define PTHREAD_RWLOCK_PREFER_WRITER_NP 1
#define PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP 2
+// LLVM libc extensions
+#define __PTHREAD_GET_ID(t) (reinterpret_cast<uintptr_t>((t).__attrib))
----------------
SchrodingerZhu wrote:
As a C header, it feels strange to only support C++. Could you dispatch this?
https://github.com/llvm/llvm-project/pull/195202
More information about the libc-commits
mailing list