kern

diff src/proc.c @ 43:5f6c5751ae05

- implemented clone_vmem
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 25 Jul 2011 11:29:02 +0300
parents e6de3c6015cb
children b8f02479e3f4
line diff
     1.1 --- a/src/proc.c	Sun Jul 24 18:29:24 2011 +0300
     1.2 +++ b/src/proc.c	Mon Jul 25 11:29:02 2011 +0300
     1.3 @@ -11,6 +11,7 @@
     1.4  	/* prepare the first process */
     1.5  
     1.6  	/* create the virtual address space for this process */
     1.7 +	proc[0].ctx.pgtbl_paddr = clone_vmem();
     1.8  
     1.9  	/* allocate a chunk of memory for the process image
    1.10  	 * and copy the code of test_proc there.
    1.11 @@ -28,10 +29,11 @@
    1.12  	 */
    1.13  }
    1.14  
    1.15 +/*
    1.16  void save_context(struct intr_frame *ifrm)
    1.17  {
    1.18  	proc[cur_pid].ctx->regs = ifrm->regs;
    1.19  	proc[cur_pid].ctx->instr_ptr = ifrm->eip;
    1.20  	proc[cur_pid].ctx->stack_ptr = ifrm->esp;
    1.21  	proc[cur_pid].ctx->flags = ifrm->eflags;
    1.22 -}
    1.23 +}*/