summaryrefslogtreecommitdiff
path: root/libpthread/pthread/pt-exit.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2011-10-30 20:14:18 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2011-10-30 20:14:18 +0100
commitd88d71c54992e93c812ad33bb2b9962c71a78fd7 (patch)
treee478d8999e5a87dff31653c8d4a7ff6e828bfc64 /libpthread/pthread/pt-exit.c
parent62e8551e80d71082c6e2ae74cca0b1a157beedce (diff)
parent10c4673df9e51862737285c87270245e025c8c1f (diff)
Merge branch 'upstream-merged'
Diffstat (limited to 'libpthread/pthread/pt-exit.c')
-rw-r--r--libpthread/pthread/pt-exit.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libpthread/pthread/pt-exit.c b/libpthread/pthread/pt-exit.c
index 5fe0ba86..c01efda0 100644
--- a/libpthread/pthread/pt-exit.c
+++ b/libpthread/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, 2011 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
@@ -35,7 +35,6 @@ pthread_exit (void *status)
struct __pthread *self = _pthread_self ();
struct __pthread_cancelation_handler **handlers;
int oldstate;
- int need_dealloc;
/* Run any cancelation handlers. According to POSIX, the
cancellation cleanup handlers should be called with cancellation
@@ -70,6 +69,11 @@ 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 */
+
switch (self->state)
{
default: