This function is unused, killing it means we need fewer refactoring to
switch to a per-socket mutex serializing event notifications.
ok?
Index: kern/uipc_socket2.c
===================================================================
RCS file: /cvs/src/sys/kern/uipc_socket2.c,v
retrieving revision 1.111
diff -u -p -r1.111 uipc_socket2.c
--- kern/uipc_socket2.c 7 Jun 2021 09:10:32 -0000 1.111
+++ kern/uipc_socket2.c 24 Jul 2021 09:24:01 -0000
@@ -737,55 +737,6 @@ sbappendrecord(struct socket *so, struct
}
/*
- * As above except that OOB data
- * is inserted at the beginning of the sockbuf,
- * but after any other OOB data.
- */
-void
-sbinsertoob(struct sockbuf *sb, struct mbuf *m0)
-{
- struct mbuf *m, **mp;
-
- if (m0 == NULL)
- return;
-
- SBLASTRECORDCHK(sb, "sbinsertoob 1");
-
- for (mp = &sb->sb_mb; (m = *mp) != NULL; mp = &((*mp)->m_nextpkt)) {
- again:
- switch (m->m_type) {
-
- case MT_OOBDATA:
- continue; /* WANT next train */
-
- case MT_CONTROL:
- if ((m = m->m_next) != NULL)
- goto again; /* inspect THIS train further */
- }
- break;
- }
- /*
- * Put the first mbuf on the queue.
- * Note this permits zero length records.
- */
- sballoc(sb, m0);
- m0->m_nextpkt = *mp;
- if (*mp == NULL) {
- /* m0 is actually the new tail */
- sb->sb_lastrecord = m0;
- }
- *mp = m0;
- m = m0->m_next;
- m0->m_next = NULL;
- if (m && (m0->m_flags & M_EOR)) {
- m0->m_flags &= ~M_EOR;
- m->m_flags |= M_EOR;
- }
- sbcompress(sb, m, m0);
- SBLASTRECORDCHK(sb, "sbinsertoob 2");
-}
-
-/*
* Append address and data, and optionally, control (ancillary) data
* to the receive queue of a socket. If present,
* m0 must include a packet header with total length.
Index: sys/socketvar.h
===================================================================
RCS file: /cvs/src/sys/sys/socketvar.h,v
retrieving revision 1.98
diff -u -p -r1.98 socketvar.h
--- sys/socketvar.h 7 Jun 2021 09:10:32 -0000 1.98
+++ sys/socketvar.h 24 Jul 2021 09:23:59 -0000
@@ -293,7 +293,6 @@ struct mbuf *
void sbdrop(struct socket *, struct sockbuf *, int);
void sbdroprecord(struct sockbuf *);
void sbflush(struct socket *, struct sockbuf *);
-void sbinsertoob(struct sockbuf *, struct mbuf *);
void sbrelease(struct socket *, struct sockbuf *);
int sbcheckreserve(u_long, u_long);
int sbchecklowmem(void);