[libc-commits] [libc] [libc][patch 1/n] ensure tls dtors are called in main thread (PR #133641)

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Mon Mar 31 14:40:48 PDT 2025


================
@@ -14,8 +14,12 @@
 namespace LIBC_NAMESPACE_DECL {
 
 extern "C" void __cxa_finalize(void *);
+extern "C" [[gnu::weak]] void __cxa_thread_finalize();
 
+// TODO: use recursive mutex to protect this routine.
----------------
jhuber6 wrote:

I was wondering earlier if it would be possible to just make these routines lock free, since I'm pretty sure it's an append-only data structure, pretty trivial to, I could probably add that functionality to the existing blockstore.

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


More information about the libc-commits mailing list