Use sbi::shutdown in batch.rs

This commit is contained in:
Yifan Wu 2023-03-29 20:05:26 +08:00
parent ed115c588e
commit d1caa3f805

View File

@ -1,5 +1,6 @@
//! batch subsystem
use crate::sbi::shutdown;
use crate::sync::UPSafeCell;
use crate::trap::TrapContext;
use core::arch::asm;
@ -69,8 +70,7 @@ impl AppManager {
unsafe fn load_app(&self, app_id: usize) {
if app_id >= self.num_app {
println!("All applications completed!");
use crate::board::QEMUExit;
crate::board::QEMU_EXIT_HANDLE.exit_success();
shutdown(false);
}
println!("[kernel] Loading app_{}", app_id);
// clear app area