From 9c65b32d9e8d84372e193ae2516b46d504d38263 Mon Sep 17 00:00:00 2001 From: Robert Morris Date: Thu, 11 Aug 2016 15:41:53 -0400 Subject: [PATCH] nothing much --- initcode.S | 1 + proc.c | 2 +- vm.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/initcode.S b/initcode.S index 109341a..80ac5d8 100644 --- a/initcode.S +++ b/initcode.S @@ -1,4 +1,5 @@ # Initial process execs /init. +# This code runs in user space. #include "syscall.h" #include "traps.h" diff --git a/proc.c b/proc.c index 3ac41f6..b6dd11f 100644 --- a/proc.c +++ b/proc.c @@ -283,7 +283,7 @@ scheduler(void) proc = p; switchuvm(p); p->state = RUNNING; - swtch(&cpu->scheduler, proc->context); + swtch(&cpu->scheduler, p->context); switchkvm(); // Process is done running for now. diff --git a/vm.c b/vm.c index cd36db5..dfc5b3c 100644 --- a/vm.c +++ b/vm.c @@ -171,7 +171,7 @@ switchuvm(struct proc *p) ltr(SEG_TSS << 3); if(p->pgdir == 0) panic("switchuvm: no pgdir"); - lcr3(v2p(p->pgdir)); // switch to new address space + lcr3(v2p(p->pgdir)); // switch to process's address space popcli(); }