summaryrefslogtreecommitdiff
path: root/pthread/pt-exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread/pt-exit.c')
-rw-r--r--pthread/pt-exit.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pthread/pt-exit.c b/pthread/pt-exit.c
index 7484ffd..941526a 100644
--- a/pthread/pt-exit.c
+++ b/pthread/pt-exit.c
@@ -1,5 +1,5 @@
/* Thread termination.
- Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc.
+ Copyright (C) 2000, 2002, 2005, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -70,6 +70,10 @@ pthread_exit (void *status)
if (self->cancel_state == PTHREAD_CANCEL_ENABLE && self->cancel_pending)
status = PTHREAD_CANCELED;
+#ifdef ENABLE_TLS
+ if (self->tcb)
+ _dl_deallocate_tls (self->tcb, 1);
+#endif /* ENABLE_TLS */
__pthread_thread_dealloc (self);
switch (self->state)