Fixed thread termination bug

svn path=/trunk/; revision=2359
This commit is contained in:
David Welch 2001-11-07 22:36:47 +00:00
parent 1355fed119
commit a122417a8a

View file

@ -1,4 +1,4 @@
/* $Id: kill.c,v 1.48 2001/11/07 02:16:25 ekohl Exp $ /* $Id: kill.c,v 1.49 2001/11/07 22:36:47 dwelch Exp $
* *
* COPYRIGHT: See COPYING in the top level directory * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -154,12 +154,14 @@ PsTerminateCurrentThread(NTSTATUS ExitStatus)
FALSE); FALSE);
current_entry = Thread->MutantListHead.Flink; current_entry = Thread->MutantListHead.Flink;
} }
KeReleaseSpinLock(&PiThreadListLock, oldIrql);
KeAcquireDispatcherDatabaseLock(FALSE); KeAcquireDispatcherDatabaseLock(FALSE);
CurrentThread->Tcb.DispatcherHeader.SignalState = TRUE; CurrentThread->Tcb.DispatcherHeader.SignalState = TRUE;
KeDispatcherObjectWake(&CurrentThread->Tcb.DispatcherHeader); KeDispatcherObjectWake(&CurrentThread->Tcb.DispatcherHeader);
KeReleaseDispatcherDatabaseLock(FALSE); KeReleaseDispatcherDatabaseLock(FALSE);
KeAcquireSpinLock(&PiThreadListLock, &oldIrql);
PsDispatchThreadNoLock(THREAD_STATE_TERMINATED_1); PsDispatchThreadNoLock(THREAD_STATE_TERMINATED_1);
KeBugCheck(0); KeBugCheck(0);
} }