Kernel: Scheduler updates tss stack on thread execution

This commit is contained in:
Bananymous 2023-04-25 14:49:50 +03:00
parent 58ce907327
commit 46dcf98fc1
1 changed files with 4 additions and 0 deletions

View File

@ -1,6 +1,7 @@
#include <kernel/Arch.h> #include <kernel/Arch.h>
#include <kernel/Attributes.h> #include <kernel/Attributes.h>
#include <kernel/CriticalScope.h> #include <kernel/CriticalScope.h>
#include <kernel/GDT.h>
#include <kernel/InterruptController.h> #include <kernel/InterruptController.h>
#include <kernel/Process.h> #include <kernel/Process.h>
#include <kernel/Scheduler.h> #include <kernel/Scheduler.h>
@ -168,7 +169,10 @@ namespace Kernel
Thread& current = current_thread(); Thread& current = current_thread();
if (current.has_process()) if (current.has_process())
{
current.process().mmu().load(); current.process().mmu().load();
GDT::set_tss_stack(current.interrupt_stack_base() + current.interrupt_stack_size());
}
else else
MMU::get().load(); MMU::get().load();