From 8fca18de89986d6275d0502af100b97274c4bab5 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 16 Nov 1999 10:56:05 +0000 Subject: 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 PR: 14914 --- sys/kern/uipc_syscalls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sys/kern/uipc_syscalls.c') diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index ade2c4d..cb21ac6f 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -205,11 +205,11 @@ accept1(p, uap, compat) splx(s); return (EINVAL); } - if ((head->so_state & SS_NBIO) && head->so_comp.tqh_first == NULL) { + if ((head->so_state & SS_NBIO) && TAILQ_EMPTY(&head->so_comp)) { splx(s); return (EWOULDBLOCK); } - while (head->so_comp.tqh_first == NULL && head->so_error == 0) { + while (TAILQ_EMPTY(&head->so_comp) && head->so_error == 0) { if (head->so_state & SS_CANTRCVMORE) { head->so_error = ECONNABORTED; break; @@ -235,7 +235,7 @@ accept1(p, uap, compat) * block allowing another process to accept the connection * instead. */ - so = head->so_comp.tqh_first; + so = TAILQ_FIRST(&head->so_comp); TAILQ_REMOVE(&head->so_comp, so, so_list); head->so_qlen--; -- cgit v1.1