summaryrefslogtreecommitdiff
path: root/pthread/pt-join.c
diff options
context:
space:
mode:
Diffstat (limited to 'pthread/pt-join.c')
-rw-r--r--pthread/pt-join.c18
1 files changed, 1 insertions, 17 deletions
diff --git a/pthread/pt-join.c b/pthread/pt-join.c
index 417f433..122d130 100644
--- a/pthread/pt-join.c
+++ b/pthread/pt-join.c
@@ -50,27 +50,11 @@ pthread_join (pthread_t thread, void **status)
switch (pthread->state)
{
case PTHREAD_EXITED:
- __pthread_mutex_unlock (&pthread->state_lock);
-
/* THREAD has already exited. Salvage its exit status. */
if (status)
*status = pthread->status;
- /* Make sure the thread is not running before we remove its
- stack. (The only possibility is that it is in a call to
- __pthread_thread_halt itself, but that is enough to cause a
- sigsegv.) */
- __pthread_thread_halt (pthread);
-
- /* Destroy the stack, the kernel resources and the control
- block. */
- if (pthread->stack)
- {
- __pthread_stack_dealloc (pthread->stackaddr, pthread->stacksize);
- pthread->stack = 0;
- }
-
- __pthread_thread_dealloc (pthread);
+ __pthread_mutex_unlock (&pthread->state_lock);
__pthread_dealloc (pthread);
break;