Switch ok with debug mode apps, implement sys_exit correctly later.
This commit is contained in:
parent
4e8059e222
commit
3f3e6b2b99
16 changed files with 244 additions and 147 deletions
|
@ -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
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue