Merge branch 'thread_scheduler' of gitlab.istic.univ-rennes1.fr:simpleos/burritos into thread_scheduler
This commit is contained in:
commit
5963759141
@ -144,6 +144,7 @@ impl ThreadManager {
|
||||
machine.interrupt.set_status(old_status);
|
||||
}
|
||||
|
||||
/// Save the CPU state of a user program on a context switch.
|
||||
pub fn thread_save_processor_state(&mut self, machine: &mut Machine, thread: Rc<RefCell<Thread>>) {
|
||||
let mut t = thread.borrow_mut();
|
||||
for i in 0..NUM_INT_REGS {
|
||||
@ -154,6 +155,7 @@ impl ThreadManager {
|
||||
}
|
||||
}
|
||||
|
||||
/// Restore the CPU state of a user program on a context switch.
|
||||
pub fn thread_restore_processor_state(&self, machine: &mut Machine, thread: Rc<RefCell<Thread>>) {
|
||||
let t: Ref<_> = thread.borrow();
|
||||
for i in 0..NUM_INT_REGS {
|
||||
|
Loading…
Reference in New Issue
Block a user