From 46dcf98fc160dcb9de4e03a8dfe161e7d7588743 Mon Sep 17 00:00:00 2001 From: Bananymous Date: Tue, 25 Apr 2023 14:49:50 +0300 Subject: [PATCH] Kernel: Scheduler updates tss stack on thread execution --- kernel/kernel/Scheduler.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/kernel/kernel/Scheduler.cpp b/kernel/kernel/Scheduler.cpp index 675963cd..37649063 100644 --- a/kernel/kernel/Scheduler.cpp +++ b/kernel/kernel/Scheduler.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include #include @@ -168,7 +169,10 @@ namespace Kernel Thread& current = current_thread(); if (current.has_process()) + { current.process().mmu().load(); + GDT::set_tss_stack(current.interrupt_stack_base() + current.interrupt_stack_size()); + } else MMU::get().load();