Rename SB_UPDATE_TAIL() to SB_EMPTY_FIXUP(), per suggestion from
Jonathan Stone.
This commit is contained in:
parent
668640a43d
commit
2807c6789c
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: kttcp.c,v 1.3 2002/07/03 19:36:52 thorpej Exp $ */
|
||||
/* $NetBSD: kttcp.c,v 1.4 2002/07/03 21:39:41 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2002 Wasabi Systems, Inc.
|
||||
|
@ -537,7 +537,7 @@ kttcp_soreceive(struct socket *so, unsigned long long slen,
|
|||
if ((flags & MSG_PEEK) == 0) {
|
||||
KASSERT(so->so_rcv.sb_mb == m);
|
||||
so->so_rcv.sb_mb = nextrecord;
|
||||
SB_UPDATE_TAIL(&so->so_rcv);
|
||||
SB_EMPTY_FIXUP(&so->so_rcv);
|
||||
}
|
||||
}
|
||||
SBLASTRECORDCHK(&so->so_rcv, "kttcp_soreceive 2");
|
||||
|
@ -599,7 +599,7 @@ kttcp_soreceive(struct socket *so, unsigned long long slen,
|
|||
so->so_rcv.sb_lastrecord = m;
|
||||
} else {
|
||||
so->so_rcv.sb_mb = nextrecord;
|
||||
SB_UPDATE_TAIL(&so->so_rcv);
|
||||
SB_EMPTY_FIXUP(&so->so_rcv);
|
||||
}
|
||||
SBLASTRECORDCHK(&so->so_rcv,
|
||||
"kttcp_soreceive 3");
|
||||
|
@ -683,7 +683,7 @@ kttcp_soreceive(struct socket *so, unsigned long long slen,
|
|||
if ((flags & MSG_PEEK) == 0) {
|
||||
if (m == 0) {
|
||||
/*
|
||||
* First part is an SB_UPDATE_TAIL(). Second part
|
||||
* First part is an SB_EMPTY_FIXUP(). Second part
|
||||
* makes sure sb_lastrecord is up-to-date if
|
||||
* there is still data in the socket buffer.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uipc_socket.c,v 1.69 2002/07/03 19:06:48 thorpej Exp $ */
|
||||
/* $NetBSD: uipc_socket.c,v 1.70 2002/07/03 21:39:41 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2002 The NetBSD Foundation, Inc.
|
||||
|
@ -72,7 +72,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.69 2002/07/03 19:06:48 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.70 2002/07/03 21:39:41 thorpej Exp $");
|
||||
|
||||
#include "opt_sock_counters.h"
|
||||
#include "opt_sosend_loan.h"
|
||||
|
@ -995,7 +995,7 @@ soreceive(struct socket *so, struct mbuf **paddr, struct uio *uio,
|
|||
if ((flags & MSG_PEEK) == 0) {
|
||||
KASSERT(so->so_rcv.sb_mb == m);
|
||||
so->so_rcv.sb_mb = nextrecord;
|
||||
SB_UPDATE_TAIL(&so->so_rcv);
|
||||
SB_EMPTY_FIXUP(&so->so_rcv);
|
||||
}
|
||||
}
|
||||
SBLASTRECORDCHK(&so->so_rcv, "soreceive 2");
|
||||
|
@ -1082,7 +1082,7 @@ soreceive(struct socket *so, struct mbuf **paddr, struct uio *uio,
|
|||
so->so_rcv.sb_lastrecord = m;
|
||||
} else {
|
||||
so->so_rcv.sb_mb = nextrecord;
|
||||
SB_UPDATE_TAIL(&so->so_rcv);
|
||||
SB_EMPTY_FIXUP(&so->so_rcv);
|
||||
}
|
||||
SBLASTRECORDCHK(&so->so_rcv, "soreceive 3");
|
||||
SBLASTMBUFCHK(&so->so_rcv, "soreceive 3");
|
||||
|
@ -1162,7 +1162,7 @@ soreceive(struct socket *so, struct mbuf **paddr, struct uio *uio,
|
|||
if ((flags & MSG_PEEK) == 0) {
|
||||
if (m == 0) {
|
||||
/*
|
||||
* First part is an inline SB_UPDATE_TAIL(). Second
|
||||
* First part is an inline SB_EMPTY_FIXUP(). Second
|
||||
* part makes sure sb_lastrecord is up-to-date if
|
||||
* there is still data in the socket buffer.
|
||||
*/
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: uipc_socket2.c,v 1.44 2002/07/03 21:36:58 thorpej Exp $ */
|
||||
/* $NetBSD: uipc_socket2.c,v 1.45 2002/07/03 21:39:41 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1988, 1990, 1993
|
||||
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.44 2002/07/03 21:36:58 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: uipc_socket2.c,v 1.45 2002/07/03 21:39:41 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -850,7 +850,7 @@ sbdrop(struct sockbuf *sb, int len)
|
|||
} else
|
||||
sb->sb_mb = next;
|
||||
/*
|
||||
* First part is an inline SB_UPDATE_TAIL(). Second part
|
||||
* First part is an inline SB_EMPTY_FIXUP(). Second part
|
||||
* makes sure sb_lastrecord is up-to-date if we dropped
|
||||
* part of the last record.
|
||||
*/
|
||||
|
@ -879,7 +879,7 @@ sbdroprecord(struct sockbuf *sb)
|
|||
MFREE(m, mn);
|
||||
} while ((m = mn) != NULL);
|
||||
}
|
||||
SB_UPDATE_TAIL(sb);
|
||||
SB_EMPTY_FIXUP(sb);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: if_x25subr.c,v 1.29 2002/07/03 19:06:52 thorpej Exp $ */
|
||||
/* $NetBSD: if_x25subr.c,v 1.30 2002/07/03 21:39:42 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
|
@ -36,7 +36,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_x25subr.c,v 1.29 2002/07/03 19:06:52 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: if_x25subr.c,v 1.30 2002/07/03 21:39:42 thorpej Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_iso.h"
|
||||
|
@ -772,7 +772,7 @@ pk_rtattach(so, m0)
|
|||
while ((m = (s)->sb_mb) != NULL) \
|
||||
{ \
|
||||
(s)->sb_mb = m->m_nextpkt; \
|
||||
SB_UPDATE_TAIL((s)); \
|
||||
SB_EMPTY_FIXUP((s)); \
|
||||
m->m_nextpkt = 0; \
|
||||
sbfree((s), m); \
|
||||
f; \
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pk_output.c,v 1.17 2002/07/03 19:06:53 thorpej Exp $ */
|
||||
/* $NetBSD: pk_output.c,v 1.18 2002/07/03 21:39:42 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1984 University of British Columbia.
|
||||
|
@ -44,7 +44,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_output.c,v 1.17 2002/07/03 19:06:53 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_output.c,v 1.18 2002/07/03 21:39:42 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -214,7 +214,7 @@ nextpk(lcp)
|
|||
return (NULL);
|
||||
|
||||
sb->sb_mb = m->m_nextpkt;
|
||||
SB_UPDATE_TAIL(sb);
|
||||
SB_EMPTY_FIXUP(sb);
|
||||
m->m_nextpkt = 0;
|
||||
for (n = m; n; n = n->m_next)
|
||||
sbfree(sb, n);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pk_usrreq.c,v 1.22 2002/07/03 19:06:54 thorpej Exp $ */
|
||||
/* $NetBSD: pk_usrreq.c,v 1.23 2002/07/03 21:39:42 thorpej Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1984 University of British Columbia.
|
||||
|
@ -44,7 +44,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_usrreq.c,v 1.22 2002/07/03 19:06:54 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: pk_usrreq.c,v 1.23 2002/07/03 21:39:42 thorpej Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -268,7 +268,7 @@ pk_usrreq(so, req, m, nam, control, p)
|
|||
if (n && n->m_type == MT_OOBDATA) {
|
||||
unsigned len = n->m_pkthdr.len;
|
||||
so->so_rcv.sb_mb = n->m_nextpkt;
|
||||
SB_UPDATE_TAIL(&so->so_rcv);
|
||||
SB_EMPTY_FIXUP(&so->so_rcv);
|
||||
if (len != n->m_len &&
|
||||
(n = m_pullup(n, len)) == 0)
|
||||
break;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: socketvar.h,v 1.53 2002/07/03 21:36:57 thorpej Exp $ */
|
||||
/* $NetBSD: socketvar.h,v 1.54 2002/07/03 21:39:40 thorpej Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1982, 1986, 1990, 1993
|
||||
|
@ -128,7 +128,7 @@ struct socket {
|
|||
struct mbuf *so_pendfree; /* loaned-page mbufs w/ frees pending */
|
||||
};
|
||||
|
||||
#define SB_UPDATE_TAIL(sb) \
|
||||
#define SB_EMPTY_FIXUP(sb) \
|
||||
do { \
|
||||
if ((sb)->sb_mb == NULL) { \
|
||||
(sb)->sb_mbtail = NULL; \
|
||||
|
|
Loading…
Reference in New Issue