- Not only did r34637 break the ARM build, it also doesn't make sense on x86 (or other) builds, because it assumes invalid data layout. For example, on x64 builds, the code would read random data.

- In the future, please refer to other code which loops the current processors and gets their KPRCB before attempting a half-assed implementation. KiProcessorBlock should be used.


svn path=/trunk/; revision=34656
This commit is contained in:
ReactOS Portable Systems Group 2008-07-22 05:37:01 +00:00
parent c6a3ef9f7e
commit afdc43c7b2

View file

@ -1180,7 +1180,7 @@ QSI_DEF(SystemPoolTagInformation)
QSI_DEF(SystemInterruptInformation)
{
PKPRCB Prcb;
PKIPCR Pcr;
PKPCR Pcr;
LONG i;
ULONG ti;
PSYSTEM_INTERRUPT_INFORMATION sii = (PSYSTEM_INTERRUPT_INFORMATION)Buffer;
@ -1192,10 +1192,10 @@ QSI_DEF(SystemInterruptInformation)
ti = KeQueryTimeIncrement();
Prcb = KeGetPcr()->Prcb;
for (i = 0; i < KeNumberProcessors; i++)
{
Pcr = CONTAINING_RECORD(Prcb, KIPCR, Prcb);
Prcb = KiProcessorBlock[i];
Pcr = CONTAINING_RECORD(Prcb, KPCR, Prcb);
sii->ContextSwitches = Pcr->ContextSwitches;
sii->DpcCount = Prcb->DpcData[0].DpcCount;
sii->DpcRate = Prcb->DpcRequestRate;
@ -1203,7 +1203,6 @@ QSI_DEF(SystemInterruptInformation)
sii->DpcBypassCount = 0;
sii->ApcBypassCount = 0;
sii++;
Prcb = (PKPRCB)((ULONG_PTR)Prcb + PAGE_SIZE);
}
return STATUS_SUCCESS;