From bddadcf71a191234c652f1a57c52259d99eac58d Mon Sep 17 00:00:00 2001 From: rwatson Date: Tue, 1 Jun 2004 02:42:56 +0000 Subject: The SS_COMP and SS_INCOMP flags in the so_state field indicate whether the socket is on an accept queue of a listen socket. This change renames the flags to SQ_COMP and SQ_INCOMP, and moves them to a new state field on the socket, so_qstate, as the locking for these flags is substantially different for the locking on the remainder of the flags in so_state. --- sys/kern/uipc_sockbuf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sys/kern/uipc_sockbuf.c') diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index a404d69..36a90ed 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -117,7 +117,7 @@ soisconnected(so) so->so_state &= ~(SS_ISCONNECTING|SS_ISDISCONNECTING|SS_ISCONFIRMING); so->so_state |= SS_ISCONNECTED; - if (head && (so->so_state & SS_INCOMP)) { + if (head && (so->so_qstate & SQ_INCOMP)) { if ((so->so_options & SO_ACCEPTFILTER) != 0) { so->so_upcall = head->so_accf->so_accept_filter->accf_callback; so->so_upcallarg = head->so_accf->so_accept_filter_arg; @@ -128,10 +128,10 @@ soisconnected(so) } TAILQ_REMOVE(&head->so_incomp, so, so_list); head->so_incqlen--; - so->so_state &= ~SS_INCOMP; + so->so_qstate &= ~SQ_INCOMP; TAILQ_INSERT_TAIL(&head->so_comp, so, so_list); head->so_qlen++; - so->so_state |= SS_COMP; + so->so_qstate |= SQ_COMP; sorwakeup(head); wakeup_one(&head->so_timeo); } else { @@ -209,7 +209,7 @@ sonewconn(head, connstatus) if (connstatus) { TAILQ_INSERT_TAIL(&head->so_comp, so, so_list); - so->so_state |= SS_COMP; + so->so_qstate |= SQ_COMP; head->so_qlen++; } else { if (head->so_incqlen > head->so_qlimit) { @@ -218,7 +218,7 @@ sonewconn(head, connstatus) (void) soabort(sp); } TAILQ_INSERT_TAIL(&head->so_incomp, so, so_list); - so->so_state |= SS_INCOMP; + so->so_qstate |= SQ_INCOMP; head->so_incqlen++; } if (connstatus) { -- cgit v1.1