nothing much
This commit is contained in:
parent
c779cc2be1
commit
9c65b32d9e
|
@ -1,4 +1,5 @@
|
||||||
# Initial process execs /init.
|
# Initial process execs /init.
|
||||||
|
# This code runs in user space.
|
||||||
|
|
||||||
#include "syscall.h"
|
#include "syscall.h"
|
||||||
#include "traps.h"
|
#include "traps.h"
|
||||||
|
|
2
proc.c
2
proc.c
|
@ -283,7 +283,7 @@ scheduler(void)
|
||||||
proc = p;
|
proc = p;
|
||||||
switchuvm(p);
|
switchuvm(p);
|
||||||
p->state = RUNNING;
|
p->state = RUNNING;
|
||||||
swtch(&cpu->scheduler, proc->context);
|
swtch(&cpu->scheduler, p->context);
|
||||||
switchkvm();
|
switchkvm();
|
||||||
|
|
||||||
// Process is done running for now.
|
// Process is done running for now.
|
||||||
|
|
2
vm.c
2
vm.c
|
@ -171,7 +171,7 @@ switchuvm(struct proc *p)
|
||||||
ltr(SEG_TSS << 3);
|
ltr(SEG_TSS << 3);
|
||||||
if(p->pgdir == 0)
|
if(p->pgdir == 0)
|
||||||
panic("switchuvm: no pgdir");
|
panic("switchuvm: no pgdir");
|
||||||
lcr3(v2p(p->pgdir)); // switch to new address space
|
lcr3(v2p(p->pgdir)); // switch to process's address space
|
||||||
popcli();
|
popcli();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue