Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/kern use LIST_FOREACH() as appropriate
details: https://anonhg.NetBSD.org/src/rev/1a74e0959729
branches: trunk
changeset: 554837:1a74e0959729
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sun Nov 02 16:42:22 2003 +0000
description:
use LIST_FOREACH() as appropriate
diffstat:
sys/kern/init_main.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (35 lines):
diff -r e9605df71416 -r 1a74e0959729 sys/kern/init_main.c
--- a/sys/kern/init_main.c Sun Nov 02 16:37:09 2003 +0000
+++ b/sys/kern/init_main.c Sun Nov 02 16:42:22 2003 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init_main.c,v 1.224 2003/08/07 16:31:41 agc Exp $ */
+/* $NetBSD: init_main.c,v 1.225 2003/11/02 16:42:22 jdolecek Exp $ */
/*
* Copyright (c) 1982, 1986, 1989, 1991, 1992, 1993
@@ -71,7 +71,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.224 2003/08/07 16:31:41 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: init_main.c,v 1.225 2003/11/02 16:42:22 jdolecek Exp $");
#include "fs_nfs.h"
#include "opt_nfsserver.h"
@@ -551,13 +551,12 @@
*/
proclist_lock_read();
s = splsched();
- for (p = LIST_FIRST(&allproc); p != NULL;
- p = LIST_NEXT(p, p_list)) {
+ LIST_FOREACH(p, &allproc, p_list) {
p->p_stats->p_start = mono_time = boottime = time;
- for (l = LIST_FIRST(&p->p_lwps); l != NULL;
- l = LIST_NEXT(l, l_sibling))
+ LIST_FOREACH(l, &p->p_lwps, l_sibling) {
if (l->l_cpu != NULL)
l->l_cpu->ci_schedstate.spc_runtime = time;
+ }
p->p_rtime.tv_sec = p->p_rtime.tv_usec = 0;
}
splx(s);
Home |
Main Index |
Thread Index |
Old Index