cleanup, sanity checking

This commit is contained in:
Ben Gras
2009-06-08 06:08:11 +00:00
parent 782133423e
commit de1b5e0076
5 changed files with 17 additions and 7 deletions

View File

@@ -142,7 +142,6 @@ int lin_lin_copy(struct proc *srcproc, vir_bytes srclinaddr,
NOREC_ENTER(linlincopy);
vmassert(vm_running);
vmassert(!catch_pagefaults);
vmassert(nfreepdes >= 3);
vmassert(ptproc);
@@ -219,8 +218,11 @@ PRIVATE void vm_set_cr3(struct proc *newptproc)
if(!intr_disabled()) { lock; u = 1; }
vm_cr3= newptproc->p_seg.p_cr3;
if(vm_cr3) {
vmassert(intr_disabled());
level0(set_cr3);
vmassert(intr_disabled());
ptproc = newptproc;
vmassert(intr_disabled());
}
if(u) { unlock; }
}

View File

@@ -403,6 +403,7 @@ _restart:
! Restart the current process or the next process if it is set.
cli
call _schedcheck ! ask C function who we're running
mov esp, (_proc_ptr) ! will assume P_STACKBASE == 0
lldt P_LDT_SEL(esp) ! enable process' segment descriptors