diff --git a/reactos/ntoskrnl/ps/kill.c b/reactos/ntoskrnl/ps/kill.c index cd07204d2b0..8ae130a41bc 100644 --- a/reactos/ntoskrnl/ps/kill.c +++ b/reactos/ntoskrnl/ps/kill.c @@ -35,7 +35,6 @@ VOID PsTerminateCurrentThread(NTSTATUS ExitStatus) KIRQL oldIrql; PETHREAD CurrentThread; - PiNrRunnableThreads--; CurrentThread = PsGetCurrentThread(); diff --git a/reactos/ntoskrnl/ps/thread.c b/reactos/ntoskrnl/ps/thread.c index d7db66eb1f2..eb182420afe 100644 --- a/reactos/ntoskrnl/ps/thread.c +++ b/reactos/ntoskrnl/ps/thread.c @@ -1,4 +1,4 @@ -/* $Id: thread.c,v 1.40 1999/12/13 22:04:41 dwelch Exp $ +/* $Id: thread.c,v 1.41 1999/12/14 00:54:29 phreak Exp $ * * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel @@ -202,6 +202,7 @@ VOID PsDispatchThreadNoLock (ULONG NewThreadStatus) PETHREAD Candidate; CurrentThread->Tcb.State = NewThreadStatus; + PiNrRunnableThreads--; if (CurrentThread->Tcb.State == THREAD_STATE_RUNNABLE) { PsInsertIntoThreadList(CurrentThread->Tcb.Priority, @@ -215,7 +216,6 @@ VOID PsDispatchThreadNoLock (ULONG NewThreadStatus) Candidate = PsScanThreadList(CurrentPriority); if (Candidate == CurrentThread) { - PiNrRunnableThreads--; KeReleaseSpinLockFromDpcLevel(&PiThreadListLock); return; } @@ -227,7 +227,6 @@ VOID PsDispatchThreadNoLock (ULONG NewThreadStatus) CurrentThread = Candidate; - PiNrRunnableThreads--; KeReleaseSpinLockFromDpcLevel( &PiThreadListLock ); HalTaskSwitch(&CurrentThread->Tcb); PsReapThreads();