11//! Process management syscalls
22use crate :: {
3- config:: MAX_SYSCALL_NUM ,
4- task:: { exit_current_and_run_next, suspend_current_and_run_next, TaskStatus } ,
3+ task:: { exit_current_and_run_next, suspend_current_and_run_next} ,
54 timer:: get_time_us,
65} ;
76
@@ -12,17 +11,6 @@ pub struct TimeVal {
1211 pub usec : usize ,
1312}
1413
15- /// Task information
16- #[ allow( dead_code) ]
17- pub struct TaskInfo {
18- /// Task status in it's life cycle
19- status : TaskStatus ,
20- /// The numbers of syscall called by task
21- syscall_times : [ u32 ; MAX_SYSCALL_NUM ] ,
22- /// Total running time of task
23- time : usize ,
24- }
25-
2614/// task exits and submit an exit code
2715pub fn sys_exit ( exit_code : i32 ) -> ! {
2816 trace ! ( "[kernel] Application exited with code {}" , exit_code) ;
@@ -50,8 +38,8 @@ pub fn sys_get_time(ts: *mut TimeVal, _tz: usize) -> isize {
5038 0
5139}
5240
53- /// YOUR JOB: Finish sys_task_info to pass testcases
54- pub fn sys_task_info ( _ti : * mut TaskInfo ) -> isize {
55- trace ! ( "kernel: sys_task_info " ) ;
41+ // TODO: implement sys_trace
42+ pub fn sys_trace ( _trace_request : usize , _id : usize , _data : usize ) -> isize {
43+ trace ! ( "kernel: sys_trace " ) ;
5644 -1
5745}
0 commit comments