From bbb79651d28d947783ecddf970bdb32ce42e5d5b Mon Sep 17 00:00:00 2001 From: ArchStacker Date: Sun, 7 Jun 2015 21:03:21 +0800 Subject: [PATCH] Fix the bug when empty run_link in lab7_result --- labcodes_answer/lab7_result/kern/process/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labcodes_answer/lab7_result/kern/process/proc.c b/labcodes_answer/lab7_result/kern/process/proc.c index eb538b8..b090956 100644 --- a/labcodes_answer/lab7_result/kern/process/proc.c +++ b/labcodes_answer/lab7_result/kern/process/proc.c @@ -124,7 +124,7 @@ alloc_proc(void) { proc->wait_state = 0; proc->cptr = proc->optr = proc->yptr = NULL; proc->rq = NULL; - proc->run_link.prev = proc->run_link.next = NULL; + list_init(&(proc->run_link)); proc->time_slice = 0; proc->lab6_run_pool.left = proc->lab6_run_pool.right = proc->lab6_run_pool.parent = NULL; proc->lab6_stride = 0;