diff options
author | Andreas Kling <awesomekling@gmail.com> | 2018-10-16 11:06:35 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2018-10-16 11:06:35 +0200 |
commit | 72bb80a9ae3bf1c705e7a31f54409d84a4fb1e3b (patch) | |
tree | 70fbb2103889a031f389aaf05fd3ac96597dff0a /Kernel/i8253.cpp | |
parent | 87d41bdca44ab4bf2958b9979e7a48dc7868200b (diff) | |
download | serenity-72bb80a9ae3bf1c705e7a31f54409d84a4fb1e3b.zip |
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.
Diffstat (limited to 'Kernel/i8253.cpp')
-rw-r--r-- | Kernel/i8253.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
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<RegisterDump*>(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" |