mirror of
https://github.com/reactos/reactos.git
synced 2025-02-28 19:32:59 +00:00
[NTOS:KE] Handle SwapBusy in x64 KiIdleLoop
This commit is contained in:
parent
3b026627e9
commit
bcbc2c8700
2 changed files with 7 additions and 0 deletions
|
@ -423,6 +423,8 @@ KiSetThreadSwapBusy(IN PKTHREAD Thread)
|
|||
{
|
||||
/* Make sure nobody already set it */
|
||||
ASSERT(Thread->SwapBusy == FALSE);
|
||||
ASSERT(KeGetCurrentIrql() >= DISPATCH_LEVEL);
|
||||
ASSERT(Thread == KeGetCurrentThread());
|
||||
|
||||
/* Set it ourselves */
|
||||
Thread->SwapBusy = TRUE;
|
||||
|
|
|
@ -107,6 +107,8 @@ KiIdleLoop(VOID)
|
|||
/* Now loop forever */
|
||||
while (TRUE)
|
||||
{
|
||||
ASSERT(KeGetCurrentThread()->SwapBusy == FALSE);
|
||||
|
||||
/* Start of the idle loop: disable interrupts */
|
||||
_enable();
|
||||
YieldProcessor();
|
||||
|
@ -131,6 +133,9 @@ KiIdleLoop(VOID)
|
|||
/* Enable interrupts */
|
||||
_enable();
|
||||
|
||||
// Do we need this?
|
||||
KiSetThreadSwapBusy(Prcb->IdleThread);
|
||||
|
||||
/* Capture current thread data */
|
||||
OldThread = Prcb->CurrentThread;
|
||||
NewThread = Prcb->NextThread;
|
||||
|
|
Loading…
Reference in a new issue