https://git.reactos.org/?p=reactos.git;a=commitdiff;h=24d124f99f20db1a455585...
commit 24d124f99f20db1a455585aa975eb64249060285 Author: Justin Miller justinmiller100@gmail.com AuthorDate: Sat Mar 26 22:22:45 2022 -0700 Commit: George Bișoc george.bisoc@reactos.org CommitDate: Wed Dec 28 21:09:41 2022 +0100
[NTOS] Set SwapBusy properly for i386
Co-authored-by: Hermès BÉLUSCA - MAÏTO hermes.belusca-maito@reactos.org --- ntoskrnl/ke/i386/thrdini.c | 3 +++ 1 file changed, 3 insertions(+)
diff --git a/ntoskrnl/ke/i386/thrdini.c b/ntoskrnl/ke/i386/thrdini.c index ae9a599a8e2..cfc497bfc69 100644 --- a/ntoskrnl/ke/i386/thrdini.c +++ b/ntoskrnl/ke/i386/thrdini.c @@ -427,6 +427,9 @@ KiSwapContextEntry(IN PKSWITCHFRAME SwitchFrame, /* Get the old thread and set its kernel stack */ OldThread->KernelStack = SwitchFrame;
+ /* Set swapbusy to false for the new thread */ + NewThread->SwapBusy = FALSE; + /* ISRs can change FPU state, so disable interrupts while checking */ _disable();