update synch.rs
This commit is contained in:
@ -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(system, next_thread);
|
||||
scheduler.switch_to(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(system, Rc::clone(&next_thread.unwrap()));
|
||||
self.g_scheduler.switch_to(Rc::clone(&next_thread.unwrap()));
|
||||
}
|
||||
|
||||
/// Finish the execution of the thread and prepare its deallocation
|
||||
|
Reference in New Issue
Block a user