From 0c7968dfd28d175cbaa72709c998f5ed9354aeb4 Mon Sep 17 00:00:00 2001 From: ArchStacker Date: Sun, 7 Jun 2015 21:03:29 +0800 Subject: [PATCH] Fix the bug when empty run_link in lab8_result --- labcodes_answer/lab8_result/kern/process/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/labcodes_answer/lab8_result/kern/process/proc.c b/labcodes_answer/lab8_result/kern/process/proc.c index efd2bd9..80abee1 100644 --- a/labcodes_answer/lab8_result/kern/process/proc.c +++ b/labcodes_answer/lab8_result/kern/process/proc.c @@ -128,7 +128,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;