Author: sginsberg
Date: Thu Jul 23 21:37:09 2009
New Revision: 42162
URL:
http://svn.reactos.org/svn/reactos?rev=42162&view=rev
Log:
- Use the KiProcessorBlock array to loop the PRCBs in a portable way
Modified:
trunk/reactos/ntoskrnl/ex/sysinfo.c
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Thu Jul 23 21:37:09 2009
@@ -956,9 +956,11 @@
}
CurrentTime.QuadPart = KeQueryInterruptTime();
- Prcb = KeGetPcr()->Prcb;
for (i = 0; i < KeNumberProcessors; i++)
{
+ /* Get the PRCB on this processor */
+ Prcb = KiProcessorBlock[i];
+
/* Calculate total user and kernel times */
TotalTime = Prcb->IdleThread->KernelTime +
Prcb->IdleThread->UserTime;
Spi->IdleTime.QuadPart = UInt32x32To64(TotalTime, KeMaximumIncrement);
@@ -968,7 +970,6 @@
Spi->InterruptTime.QuadPart = UInt32x32To64(Prcb->InterruptTime,
KeMaximumIncrement);
Spi->InterruptCount = Prcb->InterruptCount;
Spi++;
- Prcb = (PKPRCB)((ULONG_PTR)Prcb + PAGE_SIZE);
}
return STATUS_SUCCESS;