Switch ok with debug mode apps, implement sys_exit correctly later.

This commit is contained in:
Yifan Wu 2020-11-29 01:31:36 +08:00
parent 4e8059e222
commit 3f3e6b2b99
16 changed files with 244 additions and 147 deletions

View file

@ -1,6 +1,12 @@
use crate::batch::run_next_app;
use crate::task::switch_to_next_task;
pub fn sys_exit(xstate: i32) -> ! {
println!("[kernel] Application exited with code {}", xstate);
run_next_app()
//run_next_app()
panic!("[kernel] first exit!");
}
pub fn sys_yield() -> isize {
switch_to_next_task();
0
}