Update from previous chapters.
This commit is contained in:
parent
3851c2d561
commit
c33c0f8aea
7 changed files with 31 additions and 21 deletions
|
@ -2,10 +2,10 @@ use crate::task::{
|
|||
suspend_current_and_run_next,
|
||||
exit_current_and_run_next,
|
||||
};
|
||||
use crate::timer::get_time;
|
||||
use crate::timer::get_time_ms;
|
||||
|
||||
pub fn sys_exit(xstate: i32) -> ! {
|
||||
println!("[kernel] Application exited with code {}", xstate);
|
||||
pub fn sys_exit(exit_code: i32) -> ! {
|
||||
println!("[kernel] Application exited with code {}", exit_code);
|
||||
exit_current_and_run_next();
|
||||
panic!("Unreachable in sys_exit!");
|
||||
}
|
||||
|
@ -16,5 +16,5 @@ pub fn sys_yield() -> isize {
|
|||
}
|
||||
|
||||
pub fn sys_get_time() -> isize {
|
||||
get_time() as isize
|
||||
get_time_ms() as isize
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue