Author: hpoussin
Date: Wed Nov 7 00:36:47 2007
New Revision: 30228
URL:
http://svn.reactos.org/svn/reactos?rev=30228&view=rev
Log:
Simplify code
Modified:
trunk/reactos/ntoskrnl/io/iomgr/iomgr.c
trunk/reactos/ntoskrnl/ke/ipi.c
trunk/reactos/ntoskrnl/ke/thrdobj.c
trunk/reactos/ntoskrnl/ob/obinit.c
Modified: trunk/reactos/ntoskrnl/io/iomgr/iomgr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/io/iomgr/iomgr.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/io/iomgr/iomgr.c (original)
+++ trunk/reactos/ntoskrnl/io/iomgr/iomgr.c Wed Nov 7 00:36:47 2007
@@ -149,7 +149,7 @@
for (i = 0; i < KeNumberProcessors; i++)
{
/* Get the PRCB for this CPU */
- Prcb = ((PKPCR)(KIP0PCRADDRESS + i * PAGE_SIZE))->Prcb;
+ Prcb = KiProcessorBlock[i];
DPRINT("Setting up lookaside for CPU: %x, PRCB: %p\n", i, Prcb);
/* Set the Large IRP List */
Modified: trunk/reactos/ntoskrnl/ke/ipi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/ipi.c?rev=3022…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/ipi.c (original)
+++ trunk/reactos/ntoskrnl/ke/ipi.c Wed Nov 7 00:36:47 2007
@@ -33,7 +33,7 @@
if (TargetSet & Current)
{
/* Get the PRCB for this CPU */
- Prcb = ((PKPCR)(KIP0PCRADDRESS + i * PAGE_SIZE))->Prcb;
+ Prcb = KiProcessorBlock[i];
InterlockedBitTestAndSet((PLONG)&Prcb->IpiFrozen, IpiRequest);
HalRequestIpi(i);
@@ -69,7 +69,7 @@
{
if (TargetSet & Processor)
{
- Prcb = ((PKPCR)(KIP0PCRADDRESS + i * PAGE_SIZE))->Prcb;
+ Prcb = KiProcessorBlock[i];
while (0 != InterlockedCompareExchangeUL(&Prcb->SignalDone,
(LONG)CurrentPrcb, 0));
InterlockedBitTestAndSet((PLONG)&Prcb->IpiFrozen, IPI_SYNCH_REQUEST);
if (Processor != CurrentPrcb->SetMember)
Modified: trunk/reactos/ntoskrnl/ke/thrdobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/thrdobj.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/thrdobj.c (original)
+++ trunk/reactos/ntoskrnl/ke/thrdobj.c Wed Nov 7 00:36:47 2007
@@ -480,7 +480,7 @@
#ifdef CONFIG_SMP
/* Get the KNODE and its PRCB */
Node = KeNodeBlock[Process->IdealNode];
- NodePrcb = ((PKPCR)(KIP0PCRADDRESS + Process->ThreadSeed * PAGE_SIZE))->Prcb;
+ NodePrcb = KiProcessorBlock[Process->ThreadSeed];
/* Calculate affinity mask */
Set = ~NodePrcb->MultiThreadProcessorSet;
Modified: trunk/reactos/ntoskrnl/ob/obinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obinit.c?rev=3…
==============================================================================
--- trunk/reactos/ntoskrnl/ob/obinit.c (original)
+++ trunk/reactos/ntoskrnl/ob/obinit.c Wed Nov 7 00:36:47 2007
@@ -67,7 +67,7 @@
for (i = 0; i < KeNumberProcessors; i++)
{
/* Get the PRCB for this CPU */
- Prcb = ((PKPCR)(KIP0PCRADDRESS + i * PAGE_SIZE))->Prcb;
+ Prcb = KiProcessorBlock[(int)i];
/* Set the OBJECT_CREATE_INFORMATION List */
Prcb->PPLookasideList[LookasideCreateInfoList].L = &ObpCiLookasideList.L;