summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorkaashoek <kaashoek>2006-08-15 15:53:46 +0000
committerkaashoek <kaashoek>2006-08-15 15:53:46 +0000
commite958c538fa1e711479f09cab807a6a7cde5d8aeb (patch)
tree05b193a535691e31dd936954e4e824b7de700206 /main.c
parentd7b3b802f414dbf18b5e196ab1a342b19d5f7be8 (diff)
downloadxv6-labs-e958c538fa1e711479f09cab807a6a7cde5d8aeb.tar.gz
xv6-labs-e958c538fa1e711479f09cab807a6a7cde5d8aeb.tar.bz2
xv6-labs-e958c538fa1e711479f09cab807a6a7cde5d8aeb.zip
commented out code for cwd
Diffstat (limited to 'main.c')
-rw-r--r--main.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/main.c b/main.c
index a2ee845..6e1dabe 100644
--- a/main.c
+++ b/main.c
@@ -68,13 +68,14 @@ main0(void)
p->sz = 4 * PAGE;
p->mem = kalloc(p->sz);
memset(p->mem, 0, p->sz);
- p->kstack = kalloc(KSTACKSIZE);
- p->tf = (struct trapframe *) (p->kstack + KSTACKSIZE - sizeof(struct trapframe));
+ p->kstack = kalloc(KSTACKSIbZE);
+ p->tf = (struct trapframe *) (p->kstack + KSTACKSIZE) - 1;
memset(p->tf, 0, sizeof(struct trapframe));
p->tf->es = p->tf->ds = p->tf->ss = (SEG_UDATA << 3) | 3;
p->tf->cs = (SEG_UCODE << 3) | 3;
p->tf->eflags = FL_IF;
setupsegs(p);
+ // curproc[cpu()] = p;
// initialize I/O devices, let them enable interrupts
console_init();
@@ -90,6 +91,8 @@ main0(void)
cpus[cpu()].nlock--;
sti();
+ // p->cwd = iget(rootdev, 1);
+ // iunlock(p->cwd);
p = copyproc(&proc[0]);
//load_icode(p, _binary_usertests_start, (uint) _binary_usertests_size);