From 195bd57a74cf19fea357997eceb5942ec2db03e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cchenyue=E2=80=9D?= <10195501438@stu.ecnu.edu.cn> Date: Wed, 17 Mar 2021 23:18:12 +0800 Subject: [PATCH] - --- fun_2.c | 2 +- main | Bin 23632 -> 23632 bytes mytop.c | 7 +++++-- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fun_2.c b/fun_2.c index f8ef86e..e82f1c2 100644 --- a/fun_2.c +++ b/fun_2.c @@ -8,7 +8,7 @@ int pipe(int *fd); int fork(); int close(int arg); int dup(int fd); -int execvp(const char* command, char* argv[]); +int execvp(const char *, char * const *); int wait(int arg); static int num = 0; static char storage[MAXLINE][MAXLINE]; diff --git a/main b/main index d28b99de2283843ab4b1393af64e470ffbc24547..beb8b4f9012af1dd37840ccd599d47c7cbac79f1 100755 GIT binary patch delta 56 zcmV-80LTB(xB<|(0kDJu6xw`MH%ZcL^2hDUwH!~#;9v9L8 delta 56 zcmV-80LTB(xB<|(0kDJu6k;Z7*{=atLIgO5GCCQ_-O&&f*Rz-cJ}m)Kv)3;^2MB@z OE=&Xi1G=*vH!~$@gcDl; diff --git a/mytop.c b/mytop.c index 0e3bf60..b38bfae 100644 --- a/mytop.c +++ b/mytop.c @@ -1,4 +1,4 @@ - +/* #include #include #include @@ -116,7 +116,7 @@ void parse_file(pid_t pid) p->p_endpoint = endpt; p->p_pid = pid; //读入名字 状态 阻塞状态 动态优先级 进程时间 高周期 低周期 - if (fscanf(fp, " %255s %c %d %d %lu %*u %lu %lu", + if (fscanf(fp, " %255s %c %d %d %ld %*u %lu %lu", name, &state, &p->p_blocked, &p->p_priority, &p->p_user_time, &cycles_hi, &cycles_lo) != 7) { @@ -335,3 +335,6 @@ void mytop() print_procs(prev_proc,proc,1); return; } +*/ +void mytop() +{} \ No newline at end of file