mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-22 09:26:26 +04:00
Use sbi::shutdown in batch.rs
This commit is contained in:
parent
ed115c588e
commit
d1caa3f805
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user