lots of changes: prototype migration, move lots of variables, definitions,

and structure elements around.  kill some unnecessary type and macro
definitions.  standardize clock handling.  More changes than you'd want.
This commit is contained in:
cgd 1994-05-05 05:40:40 +00:00
parent 9acec7fcbb
commit 0f2ecb72f6
3 changed files with 12 additions and 12 deletions

View File

@ -1 +1 @@
revision 1.12 intentionally removed
revision 1.13 intentionally removed

View File

@ -326,9 +326,9 @@ loop:
#endif
pp = NULL;
ppri = INT_MIN;
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt)
for (p = (struct proc *)allproc; p != NULL; p = p->p_next)
if (p->p_stat == SRUN && (p->p_flag & P_INMEM) == 0) {
pri = p->p_time + p->p_slptime - p->p_nice * 8;
pri = p->p_swtime + p->p_slptime - p->p_nice * 8;
if (pri > ppri) {
pp = p;
ppri = pri;
@ -367,7 +367,7 @@ noswap:
setrq(p);
p->p_flag |= P_INMEM;
(void) spl0();
p->p_time = 0;
p->p_swtime = 0;
goto loop;
}
/*
@ -416,14 +416,14 @@ swapout_threads()
#endif
outp = outp2 = NULL;
outpri = outpri2 = 0;
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
for (p = (struct proc *)allproc; p != NULL; p = p->p_next) {
if (!swappable(p))
continue;
switch (p->p_stat) {
case SRUN:
if (p->p_time > outpri2) {
if (p->p_swtime > outpri2) {
outp2 = p;
outpri2 = p->p_time;
outpri2 = p->p_swtime;
}
continue;
@ -503,7 +503,7 @@ swapout(p)
if (p->p_stat == SRUN)
remrq(p);
(void) spl0();
p->p_time = 0;
p->p_swtime = 0;
}
/*

View File

@ -31,7 +31,7 @@
* SUCH DAMAGE.
*
* from: @(#)vm_meter.c 7.11 (Berkeley) 4/20/91
* $Id: vm_meter.c,v 1.10 1994/05/04 03:42:44 cgd Exp $
* $Id: vm_meter.c,v 1.11 1994/05/05 05:41:00 cgd Exp $
*/
#include <sys/param.h>
@ -82,19 +82,19 @@ vmtotal()
total.t_pw = 0;
total.t_sl = 0;
total.t_sw = 0;
for (p = (struct proc *)allproc; p != NULL; p = p->p_nxt) {
for (p = (struct proc *)allproc; p != NULL; p = p->p_next) {
if (p->p_flag & P_SYSTEM)
continue;
if (p->p_stat) {
switch (p->p_stat) {
case SSLEEP:
if (p->p_pri <= PZERO && p->p_slptime == 0)
if (p->p_priority <= PZERO && p->p_slptime == 0)
nrun++;
/* fall through */
case SSTOP:
if (p->p_flag & P_INMEM) {
if (p->p_pri <= PZERO)
if (p->p_priority <= PZERO)
total.t_dw++;
else if (p->p_slptime < maxslp)
total.t_sl++;