mirror of
https://github.com/rcore-os/rCore-Tutorial-v3.git
synced 2024-11-25 19:03:35 +04:00
fix ch8
This commit is contained in:
parent
dccfc54f61
commit
013e4e5c46
@ -10,6 +10,7 @@ mod task;
|
|||||||
|
|
||||||
use self::id::TaskUserRes;
|
use self::id::TaskUserRes;
|
||||||
use crate::fs::{open_file, OpenFlags};
|
use crate::fs::{open_file, OpenFlags};
|
||||||
|
use crate::sbi::shutdown;
|
||||||
use alloc::{sync::Arc, vec::Vec};
|
use alloc::{sync::Arc, vec::Vec};
|
||||||
use lazy_static::*;
|
use lazy_static::*;
|
||||||
use manager::fetch_task;
|
use manager::fetch_task;
|
||||||
@ -82,10 +83,10 @@ pub fn exit_current_and_run_next(exit_code: i32) {
|
|||||||
);
|
);
|
||||||
if exit_code != 0 {
|
if exit_code != 0 {
|
||||||
//crate::sbi::shutdown(255); //255 == -1 for err hint
|
//crate::sbi::shutdown(255); //255 == -1 for err hint
|
||||||
crate::board::QEMU_EXIT_HANDLE.exit_failure();
|
shutdown(true);
|
||||||
} else {
|
} else {
|
||||||
//crate::sbi::shutdown(0); //0 for success hint
|
//crate::sbi::shutdown(0); //0 for success hint
|
||||||
crate::board::QEMU_EXIT_HANDLE.exit_success();
|
shutdown(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
remove_from_pid2process(pid);
|
remove_from_pid2process(pid);
|
||||||
|
Loading…
Reference in New Issue
Block a user