aboutsummaryrefslogtreecommitdiff
path: root/nptl/pthread_create.c
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/pthread_create.c')
-rw-r--r--nptl/pthread_create.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/nptl/pthread_create.c b/nptl/pthread_create.c
index 6a41d50109..63cb684f04 100644
--- a/nptl/pthread_create.c
+++ b/nptl/pthread_create.c
@@ -369,6 +369,9 @@ start_thread (void *arg)
/* Initialize pointers to locale data. */
__ctype_init ();
+ /* Name the thread stack if kernel supports it. */
+ name_stack_maps (pd, true);
+
/* Register rseq TLS to the kernel. */
{
bool do_rseq = THREAD_GETMEM (pd, flags) & ATTR_FLAG_DO_RSEQ;
@@ -571,6 +574,9 @@ start_thread (void *arg)
/* Free the TCB. */
__nptl_free_tcb (pd);
+ /* Remove the associated name from the thread stack. */
+ name_stack_maps (pd, false);
+
out:
/* We cannot call '_exit' here. '_exit' will terminate the process.