diff options
Diffstat (limited to 'libpthread/pthread/pt-exit.c')
-rw-r--r-- | libpthread/pthread/pt-exit.c | 8 |
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: |