Skip to content

Commit bfab3ca

Browse files
author
haozx23
committed
update LAB1 hints
1 parent c4cdabe commit bfab3ca

File tree

4 files changed

+4
-11
lines changed

4 files changed

+4
-11
lines changed

os/proc.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,9 +81,6 @@ void scheduler(void)
8181
for (;;) {
8282
for (p = pool; p < &pool[NPROC]; p++) {
8383
if (p->state == RUNNABLE) {
84-
/*
85-
* LAB1: you may need to init proc start time here
86-
*/
8784
p->state = RUNNING;
8885
current_proc = p;
8986
swtch(&idle.context, &p->context);

os/proc.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,6 @@ struct proc {
4040
*/
4141
};
4242

43-
/*
44-
* LAB1: you may need to define struct for TaskInfo here
45-
*/
46-
4743
struct proc *curr_proc();
4844
void exit(int);
4945
void proc_init();

os/syscall.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ uint64 sys_gettimeofday(TimeVal *val, int _tz)
3737
}
3838

3939
/*
40-
* LAB1: you may need to define sys_task_info here
40+
* LAB1: you may need to define sys_trace here
4141
*/
4242

4343
extern char trap_page[];
@@ -51,7 +51,7 @@ void syscall()
5151
tracef("syscall %d args = [%x, %x, %x, %x, %x, %x]", id, args[0],
5252
args[1], args[2], args[3], args[4], args[5]);
5353
/*
54-
* LAB1: you may need to update syscall counter for task info here
54+
* LAB1: you may need to update syscall counter here
5555
*/
5656
switch (id) {
5757
case SYS_write:
@@ -67,7 +67,7 @@ void syscall()
6767
ret = sys_gettimeofday((TimeVal *)args[0], args[1]);
6868
break;
6969
/*
70-
* LAB1: you may need to add SYS_taskinfo case here
70+
* LAB1: you may need to add SYS_trace case here
7171
*/
7272
default:
7373
ret = -1;

os/syscall_ids.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
#define SYS_rseq 293
279279
#define SYS_kexec_file_load 294
280280
/*
281-
* LAB1: you may need to define SYS_task_info here
281+
* LAB1: you may need to define SYS_trace here
282282
*/
283283
#define SYS_pidfd_send_signal 424
284284
#define SYS_io_uring_setup 425

0 commit comments

Comments
 (0)