Use macro API to <sys/queue.h>

This commit is contained in:
Poul-Henning Kamp 2000-12-31 10:24:19 +00:00
parent e33941c787
commit 49851cc706
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=70536
5 changed files with 13 additions and 13 deletions

View file

@ -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 @@ msdosfs_sync(mp, waitfor, cred, p)
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 &

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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 @@ msdosfs_sync(mp, waitfor, cred, p)
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 &

View file

@ -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) \