fixed runnable thread counters

svn path=/trunk/; revision=870
This commit is contained in:
Phillip Susi 1999-12-14 00:54:29 +00:00
parent c40b27bbc4
commit 4c2f15bfb9
2 changed files with 2 additions and 4 deletions

View file

@ -35,7 +35,6 @@ VOID PsTerminateCurrentThread(NTSTATUS ExitStatus)
KIRQL oldIrql; KIRQL oldIrql;
PETHREAD CurrentThread; PETHREAD CurrentThread;
PiNrRunnableThreads--;
CurrentThread = PsGetCurrentThread(); CurrentThread = PsGetCurrentThread();

View file

@ -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 * COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
@ -202,6 +202,7 @@ VOID PsDispatchThreadNoLock (ULONG NewThreadStatus)
PETHREAD Candidate; PETHREAD Candidate;
CurrentThread->Tcb.State = NewThreadStatus; CurrentThread->Tcb.State = NewThreadStatus;
PiNrRunnableThreads--;
if (CurrentThread->Tcb.State == THREAD_STATE_RUNNABLE) if (CurrentThread->Tcb.State == THREAD_STATE_RUNNABLE)
{ {
PsInsertIntoThreadList(CurrentThread->Tcb.Priority, PsInsertIntoThreadList(CurrentThread->Tcb.Priority,
@ -215,7 +216,6 @@ VOID PsDispatchThreadNoLock (ULONG NewThreadStatus)
Candidate = PsScanThreadList(CurrentPriority); Candidate = PsScanThreadList(CurrentPriority);
if (Candidate == CurrentThread) if (Candidate == CurrentThread)
{ {
PiNrRunnableThreads--;
KeReleaseSpinLockFromDpcLevel(&PiThreadListLock); KeReleaseSpinLockFromDpcLevel(&PiThreadListLock);
return; return;
} }
@ -227,7 +227,6 @@ VOID PsDispatchThreadNoLock (ULONG NewThreadStatus)
CurrentThread = Candidate; CurrentThread = Candidate;
PiNrRunnableThreads--;
KeReleaseSpinLockFromDpcLevel( &PiThreadListLock ); KeReleaseSpinLockFromDpcLevel( &PiThreadListLock );
HalTaskSwitch(&CurrentThread->Tcb); HalTaskSwitch(&CurrentThread->Tcb);
PsReapThreads(); PsReapThreads();