- Moved the call to ExpSwapThreadEventPair from PiDeleteThread to PsTerminateCurrentThread.

svn path=/trunk/; revision=6076
This commit is contained in:
Hartmut Birr 2003-09-14 10:50:29 +00:00
parent 5eb3a136c6
commit 24203ec76e
2 changed files with 4 additions and 4 deletions

View file

@ -1,4 +1,4 @@
/* $Id: create.c,v 1.65 2003/09/10 06:12:22 vizzini Exp $
/* $Id: create.c,v 1.66 2003/09/14 10:50:29 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -26,7 +26,6 @@
#include <internal/ke.h>
#include <internal/ob.h>
#include <internal/ps.h>
#include <internal/ex.h>
#include <internal/se.h>
#include <internal/id.h>
#include <internal/dbg.h>
@ -312,7 +311,6 @@ PiDeleteThread(PVOID ObjectBody)
PiNrThreads--;
RemoveEntryList(&Thread->Tcb.ThreadListEntry);
KeReleaseSpinLock(&PiThreadListLock, oldIrql);
ExpSwapThreadEventPair(Thread, NULL); /* Release the associated eventpair object, if there was one */
for (i = 0; i < NotifyRoutineCount; i++)
{

View file

@ -1,4 +1,4 @@
/* $Id: kill.c,v 1.63 2003/08/18 11:23:32 hbirr Exp $
/* $Id: kill.c,v 1.64 2003/09/14 10:50:29 hbirr Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@ -12,6 +12,7 @@
/* INCLUDES *****************************************************************/
#include <ddk/ntddk.h>
#include <internal/ex.h>
#include <internal/ps.h>
#include <internal/ke.h>
#include <internal/mm.h>
@ -189,6 +190,7 @@ PsTerminateCurrentThread(NTSTATUS ExitStatus)
KeDispatcherObjectWake(&CurrentThread->Tcb.DispatcherHeader);
KeReleaseDispatcherDatabaseLockAtDpcLevel(FALSE);
ExpSwapThreadEventPair(CurrentThread, NULL); /* Release the associated eventpair object, if there was one */
KeRemoveAllWaitsThread (CurrentThread, STATUS_UNSUCCESSFUL, FALSE);
PsDispatchThreadNoLock(THREAD_STATE_TERMINATED_1);