Author: tfaber
Date: Mon Mar 27 20:23:37 2017
New Revision: 74236
URL:
http://svn.reactos.org/svn/reactos?rev=74236&view=rev
Log:
[NTOS:KE]
- Addendum to r74235.
CORE-12985
Modified:
trunk/reactos/ntoskrnl/ke/amd64/stubs.c
trunk/reactos/ntoskrnl/ke/arm/thrdini.c
Modified: trunk/reactos/ntoskrnl/ke/amd64/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/amd64/stubs.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/amd64/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/amd64/stubs.c [iso-8859-1] Mon Mar 27 20:23:37 2017
@@ -115,15 +115,15 @@
PKPRCB Prcb = KeGetCurrentPrcb();
PKTHREAD OldThread, NewThread;
- /* Initialize the idle loop: disable interrupts */
- _enable();
- YieldProcessor();
- YieldProcessor();
- _disable();
-
/* Now loop forever */
while (TRUE)
{
+ /* Start of the idle loop: disable interrupts */
+ _enable();
+ YieldProcessor();
+ YieldProcessor();
+ _disable();
+
/* Check for pending timers, pending DPCs, or pending ready threads */
if ((Prcb->DpcData[0].DpcQueueDepth) ||
(Prcb->TimerRequest) ||
@@ -161,12 +161,6 @@
/* Go back to DISPATCH_LEVEL */
KeLowerIrql(DISPATCH_LEVEL);
-
- /* We are back in the idle thread -- disable interrupts again */
- _enable();
- YieldProcessor();
- YieldProcessor();
- _disable();
}
else
{
Modified: trunk/reactos/ntoskrnl/ke/arm/thrdini.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/thrdini.c?…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/thrdini.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/thrdini.c [iso-8859-1] Mon Mar 27 20:23:37 2017
@@ -155,15 +155,15 @@
PKPRCB Prcb = KeGetCurrentPrcb();
PKTHREAD OldThread, NewThread;
- /* Initialize the idle loop: disable interrupts */
- _enable();
- YieldProcessor();
- YieldProcessor();
- _disable();
-
/* Now loop forever */
while (TRUE)
{
+ /* Start of the idle loop: disable interrupts */
+ _enable();
+ YieldProcessor();
+ YieldProcessor();
+ _disable();
+
/* Check for pending timers, pending DPCs, or pending ready threads */
if ((Prcb->DpcData[0].DpcQueueDepth) ||
(Prcb->TimerRequest) ||
@@ -195,12 +195,6 @@
/* Switch away from the idle thread */
KiSwapContext(APC_LEVEL, OldThread);
-
- /* We are back in the idle thread -- disable interrupts again */
- _enable();
- YieldProcessor();
- YieldProcessor();
- _disable();
}
else
{