Shadow the hedgehog

This commit is contained in:
Samy Solhi
2023-03-15 16:51:57 +01:00
parent b22b1dea21
commit 6dd0cbcc87
4 changed files with 37 additions and 44 deletions

View File

@ -70,7 +70,7 @@ impl ThreadManager {
if let Some(next_thread) = next_thread {
let scheduler = &mut self.g_scheduler;
scheduler.ready_to_run(thread);
scheduler.switch_to(next_thread);
scheduler.switch_to(system, next_thread);
}
machine.interrupt.set_status(old_status);
}
@ -86,7 +86,7 @@ impl ThreadManager {
machine.interrupt.idle();
next_thread = self.g_scheduler.find_next_to_run();
}
self.g_scheduler.switch_to(Rc::clone(&next_thread.unwrap()));
self.g_scheduler.switch_to(system, Rc::clone(&next_thread.unwrap()));
}
/// Finish the execution of the thread and prepare its deallocation