aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorPaul Pluzhnikov <ppluzhnikov@google.com>2013-12-18 16:24:19 -0800
committerPaul Pluzhnikov <ppluzhnikov@google.com>2013-12-18 16:24:19 -0800
commit35e8f7ab94c910659de9d507aa0f3e1f8973d914 (patch)
treefca3c69ec2085dbeee15673472350c9067ddf4f7 /sysdeps
parent69a17d9d245dc3551792e95e1823cc2d877592f3 (diff)
downloadglibc-35e8f7ab94c910659de9d507aa0f3e1f8973d914.tar
glibc-35e8f7ab94c910659de9d507aa0f3e1f8973d914.tar.gz
glibc-35e8f7ab94c910659de9d507aa0f3e1f8973d914.tar.bz2
glibc-35e8f7ab94c910659de9d507aa0f3e1f8973d914.zip
Patch 3/4 of the effort to make TLS access async-signal-safe.
Factor out _dl_clear_dtv. 2013-12-18 Andrew Hunter <ahh@google.com> * elf/Versions (ld): Add _dl_clear_dtv. * sysdeps/generic/ldsodefs.h (_dl_clear_dtv): New prototype. * elf/dl-tls.c (_dl_clear_dtv): New function. * nptl/allocatestack.c (get_cached_stack): Call _dl_clear_dtv.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/generic/ldsodefs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
index e919e4136c..1bda60c6fa 100644
--- a/sysdeps/generic/ldsodefs.h
+++ b/sysdeps/generic/ldsodefs.h
@@ -989,6 +989,11 @@ extern void *_dl_allocate_tls_storage (void)
extern void *_dl_allocate_tls_init (void *) internal_function;
rtld_hidden_proto (_dl_allocate_tls_init)
+/* Remove all allocated dynamic TLS regions from a DTV
+ for reuse by new thread. */
+extern void _dl_clear_dtv (dtv_t *dtv) internal_function;
+rtld_hidden_proto (_dl_clear_dtv)
+
/* Deallocate memory allocated with _dl_allocate_tls. */
extern void _dl_deallocate_tls (void *tcb, bool dealloc_tcb) internal_function;
rtld_hidden_proto (_dl_deallocate_tls)