From 72bb80a9ae3bf1c705e7a31f54409d84a4fb1e3b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Tue, 16 Oct 2018 11:06:35 +0200 Subject: These changes were lying around uncommitted in the old repo. I'm just gonna commit them without too much thinking and then take it from there. --- Kernel/i8253.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Kernel/i8253.cpp') diff --git a/Kernel/i8253.cpp b/Kernel/i8253.cpp index 3b114c0f73..42eea444b5 100644 --- a/Kernel/i8253.cpp +++ b/Kernel/i8253.cpp @@ -94,6 +94,7 @@ void clock_handle() if (current->tick()) return; + //return; auto& regs = *reinterpret_cast(state_dump); current->tss().gs = regs.gs; @@ -131,12 +132,12 @@ void clock_handle() // Add 12 for CS, EIP, EFLAGS (interrupt mechanic) current->tss().esp = regs.esp + 12; - // Prepare a new task to run. - sched(); + // Prepare a new task to run; + if (!scheduleNewTask()) + return; + Task::prepForIRETToNewTask(); // Set the NT (nested task) flag. - // sched() has LTRed a dummy task with a backlink to the next task. - // This is probably super slow/stupid, but I'm just learning... asm( "pushf\n" "orl $0x00004000, (%esp)\n" -- cgit v1.2.3