From c8e662b19c484b3710c362fa981b791f7bc12b87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 13 Oct 2004 14:54:51 +0000 Subject: [PATCH] Changed some thread exit related fields. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9324 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kernel/core/signal.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/kernel/core/signal.c b/src/kernel/core/signal.c index fef22ea8c5..e7c1c4a9dd 100644 --- a/src/kernel/core/signal.c +++ b/src/kernel/core/signal.c @@ -1,11 +1,11 @@ -/* POSIX signals handling routines -** +/* ** Copyright 2002, Angelo Mottola, a.mottola@libero.it. All rights reserved. ** Copyright 2002-2004, The Haiku Team. All rights reserved. ** ** Distributed under the terms of the Haiku License. */ +/* POSIX signals handling routines */ #include #include @@ -82,11 +82,12 @@ handle_signals(struct thread *thread, int state) case SIGKILL: case SIGKILLTHR: default: - if (!(thread->return_flags & THREAD_RETURN_EXIT)) - thread->return_flags |= THREAD_RETURN_INTERRUPTED; + if (thread->exit.reason != THREAD_RETURN_EXIT) + thread->exit.reason = THREAD_RETURN_INTERRUPTED; + RELEASE_THREAD_LOCK(); restore_interrupts(state); - + // ToDo: when we have more than a thread per process, // it can likely happen (for any thread other than the first) // that here, interrupts are still disabled.