kern

diff src/proc.c @ 53:23abbeea4d5f

llalallalala
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 08 Aug 2011 09:53:10 +0300
parents fa65b4f45366
children 4eaecb14fe31
line diff
     1.1 --- a/src/proc.c	Sun Aug 07 06:42:00 2011 +0300
     1.2 +++ b/src/proc.c	Mon Aug 08 09:53:10 2011 +0300
     1.3 @@ -53,22 +53,20 @@
     1.4  		panic("failed to allocate user stack page\n");
     1.5  	}
     1.6  	proc[1].ctx.stack_ptr = PAGE_TO_ADDR(stack_pg) + PGSIZE;
     1.7 -
     1.8 -	proc[1].stack_end = KMEM_START;
     1.9 -	proc[1].stack_start = KMEM_START - PGSIZE;
    1.10 +	proc[1].stack_start_pg = stack_pg;
    1.11  
    1.12  	/* create the virtual address space for this process */
    1.13 -	proc[1].ctx.pgtbl_paddr = clone_vm();
    1.14 +	/*proc[1].ctx.pgtbl_paddr = clone_vm();*/
    1.15  
    1.16  	/* we don't need the image and the stack in this address space */
    1.17 -	unmap_page_range(img_start_pg, proc_size_pg);
    1.18 +	/*unmap_page_range(img_start_pg, proc_size_pg);
    1.19  	pgfree(img_start_pg, proc_size_pg);
    1.20  
    1.21  	unmap_page(stack_pg);
    1.22 -	pgfree(stack_pg, 1);
    1.23 +	pgfree(stack_pg, 1);*/
    1.24  
    1.25  	/* add it to the scheduler queues */
    1.26 -	add_proc(1, STATE_RUNNING);
    1.27 +	add_proc(1, STATE_RUNNABLE);
    1.28  
    1.29  	/* switch to the initial process, this never returns */
    1.30  	context_switch(1);