cleanup, sanity checking
This commit is contained in:
parent
782133423e
commit
de1b5e0076
@ -142,7 +142,6 @@ int lin_lin_copy(struct proc *srcproc, vir_bytes srclinaddr,
|
|||||||
NOREC_ENTER(linlincopy);
|
NOREC_ENTER(linlincopy);
|
||||||
|
|
||||||
vmassert(vm_running);
|
vmassert(vm_running);
|
||||||
vmassert(!catch_pagefaults);
|
|
||||||
vmassert(nfreepdes >= 3);
|
vmassert(nfreepdes >= 3);
|
||||||
|
|
||||||
vmassert(ptproc);
|
vmassert(ptproc);
|
||||||
@ -219,8 +218,11 @@ PRIVATE void vm_set_cr3(struct proc *newptproc)
|
|||||||
if(!intr_disabled()) { lock; u = 1; }
|
if(!intr_disabled()) { lock; u = 1; }
|
||||||
vm_cr3= newptproc->p_seg.p_cr3;
|
vm_cr3= newptproc->p_seg.p_cr3;
|
||||||
if(vm_cr3) {
|
if(vm_cr3) {
|
||||||
|
vmassert(intr_disabled());
|
||||||
level0(set_cr3);
|
level0(set_cr3);
|
||||||
|
vmassert(intr_disabled());
|
||||||
ptproc = newptproc;
|
ptproc = newptproc;
|
||||||
|
vmassert(intr_disabled());
|
||||||
}
|
}
|
||||||
if(u) { unlock; }
|
if(u) { unlock; }
|
||||||
}
|
}
|
||||||
|
@ -403,6 +403,7 @@ _restart:
|
|||||||
|
|
||||||
! Restart the current process or the next process if it is set.
|
! Restart the current process or the next process if it is set.
|
||||||
|
|
||||||
|
cli
|
||||||
call _schedcheck ! ask C function who we're running
|
call _schedcheck ! ask C function who we're running
|
||||||
mov esp, (_proc_ptr) ! will assume P_STACKBASE == 0
|
mov esp, (_proc_ptr) ! will assume P_STACKBASE == 0
|
||||||
lldt P_LDT_SEL(esp) ! enable process' segment descriptors
|
lldt P_LDT_SEL(esp) ! enable process' segment descriptors
|
||||||
|
@ -99,6 +99,7 @@ message *m_ptr; /* pointer to request message */
|
|||||||
/* Despite its name, this routine is not called on every clock tick. It
|
/* Despite its name, this routine is not called on every clock tick. It
|
||||||
* is called on those clock ticks when a lot of work needs to be done.
|
* is called on those clock ticks when a lot of work needs to be done.
|
||||||
*/
|
*/
|
||||||
|
vmassert(!vm_running || (read_cr3() == ptproc->p_seg.p_cr3));
|
||||||
|
|
||||||
/* A process used up a full quantum. The interrupt handler stored this
|
/* A process used up a full quantum. The interrupt handler stored this
|
||||||
* process in 'prev_ptr'. First make sure that the process is not on the
|
* process in 'prev_ptr'. First make sure that the process is not on the
|
||||||
@ -120,12 +121,17 @@ message *m_ptr; /* pointer to request message */
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vmassert(!vm_running || (read_cr3() == ptproc->p_seg.p_cr3));
|
||||||
/* Check if a clock timer expired and run its watchdog function. */
|
/* Check if a clock timer expired and run its watchdog function. */
|
||||||
if (next_timeout <= realtime) {
|
if (next_timeout <= realtime) {
|
||||||
|
vmassert(!vm_running || (read_cr3() == ptproc->p_seg.p_cr3));
|
||||||
tmrs_exptimers(&clock_timers, realtime, NULL);
|
tmrs_exptimers(&clock_timers, realtime, NULL);
|
||||||
|
vmassert(!vm_running || (read_cr3() == ptproc->p_seg.p_cr3));
|
||||||
next_timeout = (clock_timers == NULL) ?
|
next_timeout = (clock_timers == NULL) ?
|
||||||
TMR_NEVER : clock_timers->tmr_exp_time;
|
TMR_NEVER : clock_timers->tmr_exp_time;
|
||||||
|
vmassert(!vm_running || (read_cr3() == ptproc->p_seg.p_cr3));
|
||||||
}
|
}
|
||||||
|
vmassert(!vm_running || (read_cr3() == ptproc->p_seg.p_cr3));
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -188,6 +194,8 @@ irq_hook_t *hook;
|
|||||||
|
|
||||||
if(minix_panicing) return;
|
if(minix_panicing) return;
|
||||||
|
|
||||||
|
vmassert(!vm_running || (read_cr3() == ptproc->p_seg.p_cr3));
|
||||||
|
|
||||||
/* Get number of ticks and update realtime. */
|
/* Get number of ticks and update realtime. */
|
||||||
ticks = lost_ticks + 1;
|
ticks = lost_ticks + 1;
|
||||||
lost_ticks = 0;
|
lost_ticks = 0;
|
||||||
@ -223,6 +231,7 @@ irq_hook_t *hook;
|
|||||||
|
|
||||||
if (do_serial_debug)
|
if (do_serial_debug)
|
||||||
do_ser_debug();
|
do_ser_debug();
|
||||||
|
vmassert(!vm_running || (read_cr3() == ptproc->p_seg.p_cr3));
|
||||||
|
|
||||||
return(1); /* reenable interrupts */
|
return(1); /* reenable interrupts */
|
||||||
}
|
}
|
||||||
|
@ -346,12 +346,9 @@ PUBLIC int do_getprocnr()
|
|||||||
if (((rmp->mp_flags & (IN_USE | ZOMBIE)) == IN_USE) &&
|
if (((rmp->mp_flags & (IN_USE | ZOMBIE)) == IN_USE) &&
|
||||||
strncmp(rmp->mp_name, search_key, key_len)==0) {
|
strncmp(rmp->mp_name, search_key, key_len)==0) {
|
||||||
mp->mp_reply.endpt = rmp->mp_endpoint;
|
mp->mp_reply.endpt = rmp->mp_endpoint;
|
||||||
printf("PM: name %s result: %d\n", search_key,
|
|
||||||
rmp->mp_endpoint);
|
|
||||||
return(OK);
|
return(OK);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("PM: name %s result: ESRCH\n", search_key);
|
|
||||||
return(ESRCH);
|
return(ESRCH);
|
||||||
} else { /* return own/parent process number */
|
} else { /* return own/parent process number */
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
set -e
|
set -e
|
||||||
|
|
||||||
XBIN=usr/xbin
|
XBIN=usr/xbin
|
||||||
|
BRANCHNAME=src.beng-working.r4327
|
||||||
SRC=src
|
SRC=src
|
||||||
|
|
||||||
# size of /tmp during build
|
# size of /tmp during build
|
||||||
@ -136,7 +137,7 @@ do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [ ! "$USRMB" ]
|
if [ ! "$USRMB" ]
|
||||||
then USRMB=550
|
then USRMB=120
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo $USRMB MB
|
echo $USRMB MB
|
||||||
@ -232,10 +233,10 @@ chmod -R u+w $RELEASEDIR/usr/lib
|
|||||||
if [ "$COPY" -ne 1 ]
|
if [ "$COPY" -ne 1 ]
|
||||||
then
|
then
|
||||||
echo " * Doing new svn export"
|
echo " * Doing new svn export"
|
||||||
REPO=https://gforge.cs.vu.nl/svn/minix/trunk/$SRC
|
REPO=https://gforge.cs.vu.nl/svn/minix/branches/$BRANCHNAME
|
||||||
REVISION="`svn info $USERNAME $SVNREV $REPO | grep '^Revision: ' | awk '{ print $2 }'`"
|
REVISION="`svn info $USERNAME $SVNREV $REPO | grep '^Revision: ' | awk '{ print $2 }'`"
|
||||||
echo "Doing export of revision $REVISION from $REPO."
|
echo "Doing export of revision $REVISION from $REPO."
|
||||||
( cd $RELEASEDIR/usr && svn $USERNAME export -r$REVISION $REPO )
|
( cd $RELEASEDIR/usr && svn $USERNAME export -r$REVISION $REPO && mv $BRANCHNAME $SRC )
|
||||||
REVTAG=r$REVISION
|
REVTAG=r$REVISION
|
||||||
echo "
|
echo "
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user