From d4da46a11614e03cac9e9f7a61e4beca60987de8 Mon Sep 17 00:00:00 2001 From: ArchStacker Date: Sun, 7 Jun 2015 21:02:47 +0800 Subject: [PATCH 1/3] 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; From bbb79651d28d947783ecddf970bdb32ce42e5d5b Mon Sep 17 00:00:00 2001 From: ArchStacker Date: Sun, 7 Jun 2015 21:03:21 +0800 Subject: [PATCH 2/3] 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; From 0c7968dfd28d175cbaa72709c998f5ed9354aeb4 Mon Sep 17 00:00:00 2001 From: ArchStacker Date: Sun, 7 Jun 2015 21:03:29 +0800 Subject: [PATCH 3/3] 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;