[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[hurd,commited] htl: thread_local destructors support
From: |
Samuel Thibault |
Subject: |
[hurd,commited] htl: thread_local destructors support |
Date: |
Sun, 3 Sep 2023 15:24:28 +0200 |
---
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
--
2.40.1
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [hurd,commited] htl: thread_local destructors support,
Samuel Thibault <=