From 1118f1fa0fc1c9105e39452378cc0405b808b8c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Autin?= Date: Wed, 22 Mar 2023 17:17:53 +0100 Subject: [PATCH] Added doc to thread manager --- src/kernel/thread_manager.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/kernel/thread_manager.rs b/src/kernel/thread_manager.rs index fc0a614..b9fd7ae 100644 --- a/src/kernel/thread_manager.rs +++ b/src/kernel/thread_manager.rs @@ -145,6 +145,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>) { let mut t = thread.borrow_mut(); for i in 0..NUM_INT_REGS { @@ -155,6 +156,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>) { let t: Ref<_> = thread.borrow(); for i in 0..NUM_INT_REGS {