diff options
author | phk <phk@FreeBSD.org> | 1999-11-16 10:56:05 +0000 |
---|---|---|
committer | phk <phk@FreeBSD.org> | 1999-11-16 10:56:05 +0000 |
commit | 8fca18de89986d6275d0502af100b97274c4bab5 (patch) | |
tree | d8a3cb26e484830479c8386ecba6b7d0157acc06 /sys/kern/kern_exit.c | |
parent | 520fff788fc8f2154247a6cff986abf634fdbb51 (diff) | |
download | FreeBSD-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_exit.c')
-rw-r--r-- | sys/kern/kern_exit.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_exit.c b/sys/kern/kern_exit.c index c82eca2..6fe2171 100644 --- a/sys/kern/kern_exit.c +++ b/sys/kern/kern_exit.c @@ -269,11 +269,11 @@ exit1(p, rv) LIST_REMOVE(p, p_hash); - q = p->p_children.lh_first; + q = LIST_FIRST(&p->p_children); if (q) /* only need this if any child is S_ZOMB */ wakeup((caddr_t) initproc); for (; q != 0; q = nq) { - nq = q->p_sibling.le_next; + nq = LIST_NEXT(q, p_sibling); LIST_REMOVE(q, p_sibling); LIST_INSERT_HEAD(&initproc->p_children, q, p_sibling); q->p_pptr = initproc; @@ -410,7 +410,7 @@ wait1(q, uap, compat) return (EINVAL); loop: nfound = 0; - for (p = q->p_children.lh_first; p != 0; p = p->p_sibling.le_next) { + LIST_FOREACH(p, &q->p_children, p_sibling) { if (uap->pid != WAIT_ANY && p->p_pid != uap->pid && p->p_pgid != -uap->pid) continue; |