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
+6 -5
View File
@@ -1,11 +1,11 @@
/* POSIX signals handling routines /*
**
** Copyright 2002, Angelo Mottola, [email protected]. All rights reserved. ** Copyright 2002, Angelo Mottola, [email protected]. All rights reserved.
** Copyright 2002-2004, The Haiku Team. All rights reserved. ** Copyright 2002-2004, The Haiku Team. All rights reserved.
** **
** Distributed under the terms of the Haiku License. ** Distributed under the terms of the Haiku License.
*/ */
/* POSIX signals handling routines */
#include <OS.h> #include <OS.h>
#include <KernelExport.h> #include <KernelExport.h>
@@ -82,11 +82,12 @@ handle_signals(struct thread *thread, int state)
case SIGKILL: case SIGKILL:
case SIGKILLTHR: case SIGKILLTHR:
default: default:
if (!(thread->return_flags & THREAD_RETURN_EXIT)) if (thread->exit.reason != THREAD_RETURN_EXIT)
thread->return_flags |= THREAD_RETURN_INTERRUPTED; thread->exit.reason = THREAD_RETURN_INTERRUPTED;
RELEASE_THREAD_LOCK(); RELEASE_THREAD_LOCK();
restore_interrupts(state); restore_interrupts(state);
// ToDo: when we have more than a thread per process, // ToDo: when we have more than a thread per process,
// it can likely happen (for any thread other than the first) // it can likely happen (for any thread other than the first)
// that here, interrupts are still disabled. // that here, interrupts are still disabled.