From d4da46a11614e03cac9e9f7a61e4beca60987de8 Mon Sep 17 00:00:00 2001 From: ArchStacker Date: Sun, 7 Jun 2015 21:02:47 +0800 Subject: [PATCH] Fix the bug when empty run_link in lab6_result --- labcodes_answer/lab6_result/kern/process/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labcodes_answer/lab6_result/kern/process/proc.c b/labcodes_answer/lab6_result/kern/process/proc.c index 8c61e68..42ac86f 100644 --- a/labcodes_answer/lab6_result/kern/process/proc.c +++ b/labcodes_answer/lab6_result/kern/process/proc.c @@ -118,7 +118,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;