summaryrefslogtreecommitdiff
path: root/pthread/pt-exit.c
diff options
context:
space:
mode:
authorThomas Schwinge <thomas@schwinge.name>2011-10-20 17:04:43 +0200
committerThomas Schwinge <thomas@schwinge.name>2011-10-20 17:07:46 +0200
commit081c7aeb4d4de82ab615db565c60dd776a385c34 (patch)
tree2730963b4c865851b0a17d65d03ba7131245785f /pthread/pt-exit.c
parent75f6fe21205a87d1942492cb34e8aab482008a78 (diff)
parent577976c386d89696ec392fdfbb77ea153ddd6588 (diff)
Merge branch 'tls'
Conflicts: ChangeLog Makefile pthread/pt-exit.c pthread/pt-internal.h sysdeps/mach/hurd/ia32/pt-setup.c sysdeps/mach/hurd/pt-docancel.c sysdeps/mach/hurd/pt-sysdep.h
Diffstat (limited to 'pthread/pt-exit.c')
-rw-r--r--pthread/pt-exit.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/pthread/pt-exit.c b/pthread/pt-exit.c
index 3b3853e..c01efda 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, 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
@@ -69,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: