summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_fork.c
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>1999-11-16 10:56:05 +0000
committerphk <phk@FreeBSD.org>1999-11-16 10:56:05 +0000
commit8fca18de89986d6275d0502af100b97274c4bab5 (patch)
treed8a3cb26e484830479c8386ecba6b7d0157acc06 /sys/kern/kern_fork.c
parent520fff788fc8f2154247a6cff986abf634fdbb51 (diff)
downloadFreeBSD-src-8fca18de89986d6275d0502af100b97274c4bab5.zip
FreeBSD-src-8fca18de89986d6275d0502af100b97274c4bab5.tar.gz
This is a partial commit of the patch from PR 14914:
Alot of the code in sys/kern directly accesses the *Q_HEAD and *Q_ENTRY structures for list operations. This patch makes all list operations in sys/kern use the queue(3) macros, rather than directly accessing the *Q_{HEAD,ENTRY} structures. This batch of changes compile to the same object files. Reviewed by: phk Submitted by: Jake Burkholder <jake@checker.org> PR: 14914
Diffstat (limited to 'sys/kern/kern_fork.c')
-rw-r--r--sys/kern/kern_fork.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c
index 2fb15cf..0fbe915 100644
--- a/sys/kern/kern_fork.c
+++ b/sys/kern/kern_fork.c
@@ -274,9 +274,9 @@ retry:
* is in use. Remember the lowest pid that's greater
* than nextpid, so we can avoid checking for a while.
*/
- p2 = allproc.lh_first;
+ p2 = LIST_FIRST(&allproc);
again:
- for (; p2 != 0; p2 = p2->p_list.le_next) {
+ for (; p2 != 0; p2 = LIST_NEXT(p2, p_list)) {
while (p2->p_pid == nextpid ||
p2->p_pgrp->pg_id == nextpid ||
p2->p_session->s_sid == nextpid) {
@@ -295,7 +295,7 @@ again:
}
if (!doingzomb) {
doingzomb = 1;
- p2 = zombproc.lh_first;
+ p2 = LIST_FIRST(&zombproc);
goto again;
}
}
OpenPOWER on IntegriCloud