kern

diff src/sched.c @ 53:23abbeea4d5f

llalallalala
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 08 Aug 2011 09:53:10 +0300
parents fa65b4f45366
children 88a6c4e192f9
line diff
     1.1 --- a/src/sched.c	Sun Aug 07 06:42:00 2011 +0300
     1.2 +++ b/src/sched.c	Mon Aug 08 09:53:10 2011 +0300
     1.3 @@ -62,7 +62,7 @@
     1.4  
     1.5  	proc = get_process(pid);
     1.6  
     1.7 -	q = state == STATE_RUNNING ? &runq : &waitq;
     1.8 +	q = state == STATE_RUNNABLE ? &runq : &waitq;
     1.9  
    1.10  	ins_back(q, proc);
    1.11  	proc->state = state;
    1.12 @@ -76,7 +76,7 @@
    1.13  	int istate;
    1.14  	struct process *proc = get_process(pid);
    1.15  
    1.16 -	if(proc->state != STATE_RUNNING) {
    1.17 +	if(proc->state != STATE_RUNNABLE) {
    1.18  		printf("block_proc: process %d not running\n", pid);
    1.19  		return -1;
    1.20  	}
    1.21 @@ -107,7 +107,7 @@
    1.22  
    1.23  	remove(&waitq, proc);
    1.24  	ins_back(&runq, proc);
    1.25 -	proc->state = STATE_RUNNING;
    1.26 +	proc->state = STATE_RUNNABLE;
    1.27  
    1.28  	set_intr_state(istate);
    1.29  	return 0;