kern

diff src/sched.c @ 72:3941e82b07f2

- implemented syscalls: exit, waitpid, getppid - moved sys_whatever functions out of syscall.c into more reasonable files - putting all the definitions that must be synced with userland to include/kdef.h
author John Tsiombikas <nuclear@member.fsf.org>
date Sat, 15 Oct 2011 07:45:56 +0300
parents 437360696883
children
line diff
     1.1 --- a/src/sched.c	Thu Oct 13 05:22:35 2011 +0300
     1.2 +++ b/src/sched.c	Sat Oct 15 07:45:56 2011 +0300
     1.3 @@ -75,6 +75,20 @@
     1.4  	set_intr_state(istate);
     1.5  }
     1.6  
     1.7 +void remove_proc(int pid)
     1.8 +{
     1.9 +	int istate;
    1.10 +	struct process *proc;
    1.11 +
    1.12 +	istate = get_intr_state();
    1.13 +	disable_intr();
    1.14 +
    1.15 +	proc = get_process(pid);
    1.16 +	remove(&runq, proc);
    1.17 +
    1.18 +	set_intr_state(istate);
    1.19 +}
    1.20 +
    1.21  /* block the process until we get a wakeup call for address ev */
    1.22  void wait(void *wait_addr)
    1.23  {