mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fixed runnable thread counters
svn path=/trunk/; revision=870
This commit is contained in:
parent
c40b27bbc4
commit
4c2f15bfb9
2 changed files with 2 additions and 4 deletions
|
@ -35,7 +35,6 @@ VOID PsTerminateCurrentThread(NTSTATUS ExitStatus)
|
||||||
KIRQL oldIrql;
|
KIRQL oldIrql;
|
||||||
PETHREAD CurrentThread;
|
PETHREAD CurrentThread;
|
||||||
|
|
||||||
PiNrRunnableThreads--;
|
|
||||||
|
|
||||||
CurrentThread = PsGetCurrentThread();
|
CurrentThread = PsGetCurrentThread();
|
||||||
|
|
||||||
|
|
|
@ -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();
|
||||||
|
|
Loading…
Reference in a new issue