1
1
use crate :: {
2
- config:: MAX_SYSCALL_NUM ,
3
2
fs:: { open_file, OpenFlags } ,
4
3
mm:: { translated_ref, translated_refmut, translated_str} ,
5
4
task:: {
6
5
current_process, current_task, current_user_token, exit_current_and_run_next, pid2process,
7
- suspend_current_and_run_next, SignalFlags , TaskStatus ,
6
+ suspend_current_and_run_next, SignalFlags ,
8
7
} ,
9
8
} ;
10
9
use alloc:: { string:: String , sync:: Arc , vec:: Vec } ;
@@ -16,16 +15,6 @@ pub struct TimeVal {
16
15
pub usec : usize ,
17
16
}
18
17
19
- /// Task information
20
- #[ allow( dead_code) ]
21
- pub struct TaskInfo {
22
- /// Task status in it's life cycle
23
- status : TaskStatus ,
24
- /// The numbers of syscall called by task
25
- syscall_times : [ u32 ; MAX_SYSCALL_NUM ] ,
26
- /// Total running time of task
27
- time : usize ,
28
- }
29
18
/// exit syscall
30
19
///
31
20
/// exit the current task and run the next task in task list
@@ -170,19 +159,6 @@ pub fn sys_get_time(_ts: *mut TimeVal, _tz: usize) -> isize {
170
159
-1
171
160
}
172
161
173
- /// task_info syscall
174
- ///
175
- /// YOUR JOB: Finish sys_task_info to pass testcases
176
- /// HINT: You might reimplement it with virtual memory management.
177
- /// HINT: What if [`TaskInfo`] is splitted by two pages ?
178
- pub fn sys_task_info ( _ti : * mut TaskInfo ) -> isize {
179
- trace ! (
180
- "kernel:pid[{}] sys_task_info NOT IMPLEMENTED" ,
181
- current_task( ) . unwrap( ) . process. upgrade( ) . unwrap( ) . getpid( )
182
- ) ;
183
- -1
184
- }
185
-
186
162
/// mmap syscall
187
163
///
188
164
/// YOUR JOB: Implement mmap.
0 commit comments