From 3e87558e5d279a0a3a6d78fef8f154bc2e5a037f Mon Sep 17 00:00:00 2001 From: Yifan Wu Date: Mon, 19 Jul 2021 23:50:34 +0800 Subject: [PATCH] Add comment. --- os/src/batch.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/os/src/batch.rs b/os/src/batch.rs index f2a0d649..816e8b78 100644 --- a/os/src/batch.rs +++ b/os/src/batch.rs @@ -116,6 +116,8 @@ pub fn run_next_app() -> ! { } app_manager.move_to_next_app(); drop(app_manager); + // before this we have to drop local variables related to resources manually + // and release the resources extern "C" { fn __restore(cx_addr: usize); } unsafe { __restore(KERNEL_STACK.push_context(