]> sourceware.org Git - glibc.git/commitdiff
htl: thread_local destructors support
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 3 Sep 2023 13:23:56 +0000 (15:23 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Sun, 3 Sep 2023 13:23:56 +0000 (15:23 +0200)
htl/pt-exit.c

index b1cbe85861b002f6f10c0416d9c4794af0c867be..22b585bb28b8c84bae240005f779b8c76c5b5b53 100644 (file)
@@ -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
This page took 0.044942 seconds and 5 git commands to generate.