Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/uvm use queue.h macros and other misc cleanup.



details:   https://anonhg.NetBSD.org/src/rev/e6f7633525f3
branches:  trunk
changeset: 499610:e6f7633525f3
user:      chs <chs%NetBSD.org@localhost>
date:      Fri Nov 24 18:54:31 2000 +0000

description:
use queue.h macros and other misc cleanup.

diffstat:

 sys/uvm/uvm_meter.c |  11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diffs (46 lines):

diff -r f5ebef9dbd3f -r e6f7633525f3 sys/uvm/uvm_meter.c
--- a/sys/uvm/uvm_meter.c       Fri Nov 24 16:19:05 2000 +0000
+++ b/sys/uvm/uvm_meter.c       Fri Nov 24 18:54:31 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uvm_meter.c,v 1.13 2000/06/27 17:29:27 mrg Exp $       */
+/*     $NetBSD: uvm_meter.c,v 1.14 2000/11/24 18:54:31 chs Exp $       */
 
 /*
  * Copyright (c) 1997 Charles D. Cranor and Washington University.
@@ -52,7 +52,7 @@
  */
 
 int maxslp = MAXSLP;   /* patchable ... */
-struct loadavg averunnable; /* decl. */
+struct loadavg averunnable;
 
 /*
  * constants for averages over 1, 5, and 15 minutes when sampling at 
@@ -81,7 +81,7 @@
        if ((time.tv_sec % 5) == 0)
                uvm_loadav(&averunnable);
        if (proc0.p_slptime > (maxslp / 2))
-               wakeup((caddr_t)&proc0);
+               wakeup(&proc0);
 }
 
 /*
@@ -96,7 +96,8 @@
        struct proc *p;
 
        proclist_lock_read();
-       for (nrun = 0, p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
+       nrun = 0;
+       LIST_FOREACH(p, &allproc, p_list) {
                switch (p->p_stat) {
                case SSLEEP:
                        if (p->p_priority > PZERO || p->p_slptime > 1)
@@ -177,7 +178,7 @@
         */
 
        proclist_lock_read();
-       for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
+       LIST_FOREACH(p, &allproc, p_list) {
                if (p->p_flag & P_SYSTEM)
                        continue;
                switch (p->p_stat) {



Home | Main Index | Thread Index | Old Index