public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc] htl: thread_local destructors support
@ 2023-09-03 13:24 Samuel Thibault
  0 siblings, 0 replies; only message in thread
From: Samuel Thibault @ 2023-09-03 13:24 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=89ade8d8cb4c4f015942ab9b1319397b223012cf

commit 89ade8d8cb4c4f015942ab9b1319397b223012cf
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date:   Sun Sep 3 15:23:56 2023 +0200

    htl: thread_local destructors support

Diff:
---
 htl/pt-exit.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/htl/pt-exit.c b/htl/pt-exit.c
index b1cbe85861..22b585bb28 100644
--- a/htl/pt-exit.c
+++ b/htl/pt-exit.c
@@ -46,6 +46,12 @@ __pthread_exit (void *status)
        *handlers = (*handlers)->__next)
     (*handlers)->__handler ((*handlers)->__arg);
 
+  /* Call destructors for the thread_local TLS variables.  */
+#ifndef SHARED
+  if (&__call_tls_dtors != NULL)
+#endif
+    __call_tls_dtors ();
+
   __pthread_setcancelstate (oldstate, &oldstate);
 
   /* Decrease the number of threads.  We use an atomic operation to

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-09-03 13:24 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-09-03 13:24 [glibc] htl: thread_local destructors support Samuel Thibault

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).