Merge pull request #14 from Archstacker/fix_runlink

Fix the bug when empty run_link
This commit is contained in:
chyyuu 2015-06-09 20:59:35 +08:00
commit a0e039ea87
3 changed files with 3 additions and 3 deletions

View File

@ -118,7 +118,7 @@ alloc_proc(void) {
proc->wait_state = 0; proc->wait_state = 0;
proc->cptr = proc->optr = proc->yptr = NULL; proc->cptr = proc->optr = proc->yptr = NULL;
proc->rq = NULL; proc->rq = NULL;
proc->run_link.prev = proc->run_link.next = NULL; list_init(&(proc->run_link));
proc->time_slice = 0; proc->time_slice = 0;
proc->lab6_run_pool.left = proc->lab6_run_pool.right = proc->lab6_run_pool.parent = NULL; proc->lab6_run_pool.left = proc->lab6_run_pool.right = proc->lab6_run_pool.parent = NULL;
proc->lab6_stride = 0; proc->lab6_stride = 0;

View File

@ -124,7 +124,7 @@ alloc_proc(void) {
proc->wait_state = 0; proc->wait_state = 0;
proc->cptr = proc->optr = proc->yptr = NULL; proc->cptr = proc->optr = proc->yptr = NULL;
proc->rq = NULL; proc->rq = NULL;
proc->run_link.prev = proc->run_link.next = NULL; list_init(&(proc->run_link));
proc->time_slice = 0; proc->time_slice = 0;
proc->lab6_run_pool.left = proc->lab6_run_pool.right = proc->lab6_run_pool.parent = NULL; proc->lab6_run_pool.left = proc->lab6_run_pool.right = proc->lab6_run_pool.parent = NULL;
proc->lab6_stride = 0; proc->lab6_stride = 0;

View File

@ -128,7 +128,7 @@ alloc_proc(void) {
proc->wait_state = 0; proc->wait_state = 0;
proc->cptr = proc->optr = proc->yptr = NULL; proc->cptr = proc->optr = proc->yptr = NULL;
proc->rq = NULL; proc->rq = NULL;
proc->run_link.prev = proc->run_link.next = NULL; list_init(&(proc->run_link));
proc->time_slice = 0; proc->time_slice = 0;
proc->lab6_run_pool.left = proc->lab6_run_pool.right = proc->lab6_run_pool.parent = NULL; proc->lab6_run_pool.left = proc->lab6_run_pool.right = proc->lab6_run_pool.parent = NULL;
proc->lab6_stride = 0; proc->lab6_stride = 0;