Skip to content

Commit 014fcd3

Browse files
author
haozx23
committed
update LAB1 hints
1 parent 4f4769e commit 014fcd3

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
@@ -85,9 +85,6 @@ void scheduler(void)
8585
for (;;) {
8686
for (p = pool; p < &pool[NPROC]; p++) {
8787
if (p->state == RUNNABLE) {
88-
/*
89-
* LAB1: you may need to init proc start time here
90-
*/
9188
p->state = RUNNING;
9289
current_proc = p;
9390
swtch(&idle.context, &p->context);

os/proc.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ struct proc {
4545
*/
4646
};
4747

48-
/*
49-
* LAB1: you may need to define struct for TaskInfo here
50-
*/
51-
5248
struct proc *curr_proc();
5349
void exit(int);
5450
void proc_init();

os/syscall.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ uint64 sys_sbrk(int n)
6363
// hint: read through docstrings in vm.c. Watching CH4 video may also help.
6464
// Note the return value and PTE flags (especially U,X,W,R)
6565
/*
66-
* LAB1: you may need to define sys_task_info here
66+
* LAB1: you may need to define sys_trace here
6767
*/
6868

6969
extern char trap_page[];
@@ -77,7 +77,7 @@ void syscall()
7777
tracef("syscall %d args = [%x, %x, %x, %x, %x, %x]", id, args[0],
7878
args[1], args[2], args[3], args[4], args[5]);
7979
/*
80-
* LAB1: you may need to update syscall counter for task info here
80+
* LAB1: you may need to update syscall counter here
8181
*/
8282
switch (id) {
8383
case SYS_write:
@@ -96,7 +96,7 @@ void syscall()
9696
ret = sys_sbrk(args[0]);
9797
break;
9898
/*
99-
* LAB1: you may need to add SYS_taskinfo case here
99+
* LAB1: you may need to add SYS_trace case here
100100
*/
101101
default:
102102
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

284284

0 commit comments

Comments
 (0)