mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:45:50 +00:00
[NTOS:KE]
- Make sure to disable interrupts each iteration of the idle loop, since IdleFunction can leave them enabled. CORE-12985 #resolve svn path=/trunk/; revision=74235
This commit is contained in:
parent
73696326a3
commit
10236225d3
1 changed files with 6 additions and 12 deletions
|
@ -270,15 +270,15 @@ KiIdleLoop(VOID)
|
|||
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) ||
|
||||
|
@ -310,12 +310,6 @@ KiIdleLoop(VOID)
|
|||
|
||||
/* 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
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue