diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-09-03 15:23:56 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2023-09-03 15:23:56 +0200 |
commit | 89ade8d8cb4c4f015942ab9b1319397b223012cf (patch) | |
tree | 7279791a48cdf3bfe07dc0e3a5141c42f32fa4a3 | |
parent | d2123d68275acc0f061e73d5f86ca504e0d5a344 (diff) | |
download | glibc-89ade8d8cb4c4f015942ab9b1319397b223012cf.tar glibc-89ade8d8cb4c4f015942ab9b1319397b223012cf.tar.gz glibc-89ade8d8cb4c4f015942ab9b1319397b223012cf.tar.bz2 glibc-89ade8d8cb4c4f015942ab9b1319397b223012cf.zip |
htl: thread_local destructors support
-rw-r--r-- | htl/pt-exit.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 |