[libc-commits] [libc] [libc] Add an extension macro to get numerical thread id (PR #195202)

Alexey Samsonov via libc-commits libc-commits at lists.llvm.org
Mon May 4 23:23:21 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))
----------------
vonosmas wrote:

Thank you for the pointer, done!

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


More information about the libc-commits mailing list