This commit is contained in:
Yifan Wu 2023-03-29 20:40:34 +08:00
parent 22e52514a5
commit 5a439b8689

View file

@ -15,6 +15,7 @@ mod switch;
mod task; mod task;
use crate::loader::{get_app_data, get_num_app}; use crate::loader::{get_app_data, get_num_app};
use crate::sbi::shutdown;
use crate::sync::UPSafeCell; use crate::sync::UPSafeCell;
use crate::trap::TrapContext; use crate::trap::TrapContext;
use alloc::vec::Vec; use alloc::vec::Vec;
@ -151,8 +152,7 @@ impl TaskManager {
// go back to user mode // go back to user mode
} else { } else {
println!("All applications completed!"); println!("All applications completed!");
use crate::board::QEMUExit; shutdown(false);
crate::board::QEMU_EXIT_HANDLE.exit_success();
} }
} }
} }