From 59cac783f5ba12a47308b05b87d5cfa769473a49 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Wed, 11 Jul 2018 05:38:01 +1000 Subject: Modified the tick_handler interrupt routine in timer.s so that it no longer calls reschedule() directly. It now calls sched_tick() so that the scheduler can make it's own decisions relating to handling the timer interrupt. The reschedule() function now *actually* implements a basic round-robin scheduling algorithm that iterates through the list of tasks. This is still a temporary algorithm but at least it now includes *all* runnable processes instead of switching back and forth between process 1 and 2. --- kernel/timer.s | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'kernel/timer.s') diff --git a/kernel/timer.s b/kernel/timer.s index c84a847..12ea9d0 100644 --- a/kernel/timer.s +++ b/kernel/timer.s @@ -2,7 +2,7 @@ global ticks global timer_init extern cstate extern register_isr -extern reschedule +extern sched_tick ticks: dd 0 @@ -26,7 +26,7 @@ tick_handler: out 0x20, al ; call the scheduler - call reschedule + call sched_tick ; restore the data segment selectors pop ax -- cgit v1.3