Skip to content

Commit c0529cf

Browse files
committed
remove old tests
1 parent e4792a0 commit c0529cf

File tree

4 files changed

+4
-30
lines changed

4 files changed

+4
-30
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,6 @@ tools/
1616
pushall.sh
1717
*.bak
1818

19-
user/*
19+
ci-user/
20+
os/vendor/
21+
user/

os/src/config.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ pub const KERNEL_HEAP_SIZE: usize = 0x200_0000;
1313
pub const PAGE_SIZE: usize = 0x1000;
1414
/// page size bits: 12
1515
pub const PAGE_SIZE_BITS: usize = 0xc;
16-
/// the max number of syscall
17-
pub const MAX_SYSCALL_NUM: usize = 500;
1816
/// the virtual addr of trapoline
1917
pub const TRAMPOLINE: usize = usize::MAX - PAGE_SIZE + 1;
2018
/// the virtual addr of trap context

os/src/syscall/mod.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,6 @@ const SYSCALL_MMAP: usize = 222;
3737
const SYSCALL_WAITPID: usize = 260;
3838
/// spawn syscall
3939
const SYSCALL_SPAWN: usize = 400;
40-
/// taskinfo syscall
41-
const SYSCALL_TASK_INFO: usize = 410;
4240

4341
mod fs;
4442
mod process;
@@ -57,7 +55,6 @@ pub fn syscall(syscall_id: usize, args: [usize; 3]) -> isize {
5755
SYSCALL_EXEC => sys_exec(args[0] as *const u8),
5856
SYSCALL_WAITPID => sys_waitpid(args[0] as isize, args[1] as *mut i32),
5957
SYSCALL_GET_TIME => sys_get_time(args[0] as *mut TimeVal, args[1]),
60-
SYSCALL_TASK_INFO => sys_task_info(args[0] as *mut TaskInfo),
6158
SYSCALL_MMAP => sys_mmap(args[0], args[1], args[2]),
6259
SYSCALL_MUNMAP => sys_munmap(args[0], args[1]),
6360
SYSCALL_SBRK => sys_sbrk(args[0] as i32),

os/src/syscall/process.rs

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
use alloc::sync::Arc;
33

44
use crate::{
5-
config::MAX_SYSCALL_NUM,
65
loader::get_app_data_by_name,
76
mm::{translated_refmut, translated_str},
87
task::{
98
add_task, current_task, current_user_token, exit_current_and_run_next,
10-
suspend_current_and_run_next, TaskStatus,
9+
suspend_current_and_run_next,
1110
},
1211
};
1312

@@ -18,17 +17,6 @@ pub struct TimeVal {
1817
pub usec: usize,
1918
}
2019

21-
/// Task information
22-
#[allow(dead_code)]
23-
pub struct TaskInfo {
24-
/// Task status in it's life cycle
25-
status: TaskStatus,
26-
/// The numbers of syscall called by task
27-
syscall_times: [u32; MAX_SYSCALL_NUM],
28-
/// Total running time of task
29-
time: usize,
30-
}
31-
3220
/// task exits and submit an exit code
3321
pub fn sys_exit(exit_code: i32) -> ! {
3422
trace!("kernel:pid[{}] sys_exit", current_task().unwrap().pid.0);
@@ -125,17 +113,6 @@ pub fn sys_get_time(_ts: *mut TimeVal, _tz: usize) -> isize {
125113
-1
126114
}
127115

128-
/// YOUR JOB: Finish sys_task_info to pass testcases
129-
/// HINT: You might reimplement it with virtual memory management.
130-
/// HINT: What if [`TaskInfo`] is splitted by two pages ?
131-
pub fn sys_task_info(_ti: *mut TaskInfo) -> isize {
132-
trace!(
133-
"kernel:pid[{}] sys_task_info NOT IMPLEMENTED",
134-
current_task().unwrap().pid.0
135-
);
136-
-1
137-
}
138-
139116
/// YOUR JOB: Implement mmap.
140117
pub fn sys_mmap(_start: usize, _len: usize, _port: usize) -> isize {
141118
trace!(

0 commit comments

Comments
 (0)