Skip to content

Commit

Permalink
nothing much
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Morris committed Aug 11, 2016
1 parent c779cc2 commit 9c65b32
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions initcode.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Initial process execs /init.
# This code runs in user space.

#include "syscall.h"
#include "traps.h"
Expand Down
2 changes: 1 addition & 1 deletion proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}

Expand Down

0 comments on commit 9c65b32

Please sign in to comment.