summaryrefslogtreecommitdiffstats
path: root/sys/kern/kern_synch.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_synch.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_synch.c')
-rw-r--r--sys/kern/kern_synch.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c
index 293a75f..4811669 100644
--- a/sys/kern/kern_synch.c
+++ b/sys/kern/kern_synch.c
@@ -251,7 +251,7 @@ schedcpu(arg)
register unsigned int newcpu;
realstathz = stathz ? stathz : hz;
- for (p = allproc.lh_first; p != 0; p = p->p_list.le_next) {
+ LIST_FOREACH(p, &allproc, p_list) {
/*
* Increment time in/out of memory and sleep time
* (if sleeping). We ignore overflow; with 16-bit int's
@@ -689,7 +689,7 @@ wakeup(ident)
s = splhigh();
qp = &slpque[LOOKUP(ident)];
restart:
- for (p = qp->tqh_first; p != NULL; p = p->p_procq.tqe_next) {
+ TAILQ_FOREACH(p, qp, p_procq) {
if (p->p_wchan == ident) {
TAILQ_REMOVE(qp, p, p_procq);
p->p_wchan = 0;
@@ -730,7 +730,7 @@ wakeup_one(ident)
s = splhigh();
qp = &slpque[LOOKUP(ident)];
- for (p = qp->tqh_first; p != NULL; p = p->p_procq.tqe_next) {
+ TAILQ_FOREACH(p, qp, p_procq) {
if (p->p_wchan == ident) {
TAILQ_REMOVE(qp, p, p_procq);
p->p_wchan = 0;
OpenPOWER on IntegriCloud