aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2000-12-31 10:24:19 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2000-12-31 10:24:19 +0000
commit49851cc7066a21a26eab8279e84843fed2dc8289 (patch)
tree72024eb651bc0f6b719ce4b0944ff963fbc3674b
parente33941c78774948e61a3dd7c292f52ba299becc0 (diff)
downloadsrc-49851cc7066a21a26eab8279e84843fed2dc8289.tar.gz
src-49851cc7066a21a26eab8279e84843fed2dc8289.zip
Use macro API to <sys/queue.h>
Notes
Notes: svn path=/head/; revision=70536
-rw-r--r--sys/fs/msdosfs/msdosfs_vfsops.c4
-rw-r--r--sys/fs/procfs/procfs_vnops.c8
-rw-r--r--sys/miscfs/procfs/procfs_vnops.c8
-rw-r--r--sys/msdosfs/msdosfs_vfsops.c4
-rw-r--r--sys/sys/socketvar.h2
5 files changed, 13 insertions, 13 deletions
diff --git a/sys/fs/msdosfs/msdosfs_vfsops.c b/sys/fs/msdosfs/msdosfs_vfsops.c
index 30b55223fabc..d1163280c533 100644
--- a/sys/fs/msdosfs/msdosfs_vfsops.c
+++ b/sys/fs/msdosfs/msdosfs_vfsops.c
@@ -865,7 +865,7 @@ msdosfs_sync(mp, waitfor, cred, p)
*/
simple_lock(&mntvnode_slock);
loop:
- for (vp = mp->mnt_vnodelist.lh_first; vp != NULL; vp = nvp) {
+ for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) {
/*
* If the vnode that we are about to sync is no longer
* associated with this mount point, start over.
@@ -874,7 +874,7 @@ loop:
goto loop;
mtx_enter(&vp->v_interlock, MTX_DEF);
- nvp = vp->v_mntvnodes.le_next;
+ nvp = LIST_NEXT(vp, v_mntvnodes);
dep = VTODE(vp);
if (vp->v_type == VNON ||
((dep->de_flag &
diff --git a/sys/fs/procfs/procfs_vnops.c b/sys/fs/procfs/procfs_vnops.c
index 05ad13a0ea7a..27e37071c554 100644
--- a/sys/fs/procfs/procfs_vnops.c
+++ b/sys/fs/procfs/procfs_vnops.c
@@ -823,7 +823,7 @@ procfs_readdir(ap)
struct proc *p;
ALLPROC_LOCK(AP_SHARED);
- p = allproc.lh_first;
+ p = LIST_FIRST(&allproc);
for (; p && uio->uio_resid >= delen; i++, pcnt++) {
bzero((char *) dp, delen);
dp->d_reclen = delen;
@@ -847,7 +847,7 @@ procfs_readdir(ap)
default:
while (pcnt < i) {
- p = p->p_list.le_next;
+ p = LIST_NEXT(p, p_list);
if (!p)
goto done;
if (p_can(curproc, p, P_CAN_SEE, NULL))
@@ -855,7 +855,7 @@ procfs_readdir(ap)
pcnt++;
}
while (p_can(curproc, p, P_CAN_SEE, NULL)) {
- p = p->p_list.le_next;
+ p = LIST_NEXT(p, p_list);
if (!p)
goto done;
}
@@ -863,7 +863,7 @@ procfs_readdir(ap)
dp->d_namlen = sprintf(dp->d_name, "%ld",
(long)p->p_pid);
dp->d_type = DT_DIR;
- p = p->p_list.le_next;
+ p = LIST_NEXT(p, p_list);
break;
}
diff --git a/sys/miscfs/procfs/procfs_vnops.c b/sys/miscfs/procfs/procfs_vnops.c
index 05ad13a0ea7a..27e37071c554 100644
--- a/sys/miscfs/procfs/procfs_vnops.c
+++ b/sys/miscfs/procfs/procfs_vnops.c
@@ -823,7 +823,7 @@ procfs_readdir(ap)
struct proc *p;
ALLPROC_LOCK(AP_SHARED);
- p = allproc.lh_first;
+ p = LIST_FIRST(&allproc);
for (; p && uio->uio_resid >= delen; i++, pcnt++) {
bzero((char *) dp, delen);
dp->d_reclen = delen;
@@ -847,7 +847,7 @@ procfs_readdir(ap)
default:
while (pcnt < i) {
- p = p->p_list.le_next;
+ p = LIST_NEXT(p, p_list);
if (!p)
goto done;
if (p_can(curproc, p, P_CAN_SEE, NULL))
@@ -855,7 +855,7 @@ procfs_readdir(ap)
pcnt++;
}
while (p_can(curproc, p, P_CAN_SEE, NULL)) {
- p = p->p_list.le_next;
+ p = LIST_NEXT(p, p_list);
if (!p)
goto done;
}
@@ -863,7 +863,7 @@ procfs_readdir(ap)
dp->d_namlen = sprintf(dp->d_name, "%ld",
(long)p->p_pid);
dp->d_type = DT_DIR;
- p = p->p_list.le_next;
+ p = LIST_NEXT(p, p_list);
break;
}
diff --git a/sys/msdosfs/msdosfs_vfsops.c b/sys/msdosfs/msdosfs_vfsops.c
index 30b55223fabc..d1163280c533 100644
--- a/sys/msdosfs/msdosfs_vfsops.c
+++ b/sys/msdosfs/msdosfs_vfsops.c
@@ -865,7 +865,7 @@ msdosfs_sync(mp, waitfor, cred, p)
*/
simple_lock(&mntvnode_slock);
loop:
- for (vp = mp->mnt_vnodelist.lh_first; vp != NULL; vp = nvp) {
+ for (vp = LIST_FIRST(&mp->mnt_vnodelist); vp != NULL; vp = nvp) {
/*
* If the vnode that we are about to sync is no longer
* associated with this mount point, start over.
@@ -874,7 +874,7 @@ loop:
goto loop;
mtx_enter(&vp->v_interlock, MTX_DEF);
- nvp = vp->v_mntvnodes.le_next;
+ nvp = LIST_NEXT(vp, v_mntvnodes);
dep = VTODE(vp);
if (vp->v_type == VNON ||
((dep->de_flag &
diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h
index e97d762d0a4d..d363c4db36d3 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -200,7 +200,7 @@ struct xsocket {
#define soreadable(so) \
((so)->so_rcv.sb_cc >= (so)->so_rcv.sb_lowat || \
((so)->so_state & SS_CANTRCVMORE) || \
- (so)->so_comp.tqh_first || (so)->so_error)
+ !TAILQ_EMPTY(&(so)->so_comp) || (so)->so_error)
/* can we write something to so? */
#define sowriteable(so) \