Changed some thread exit related fields.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@9324 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2004-10-13 14:54:51 +00:00
parent c2289a8876
commit c8e662b19c

View File

@ -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 <OS.h>
#include <KernelExport.h>
@ -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.