sockets: garbage collect SB_NOINTR

Not used.  All socket buffer sleeps are interruptible.
This commit is contained in:
Gleb Smirnoff
2025-02-01 12:06:21 -08:00
parent 6befd35111
commit 9d7fb76854
4 changed files with 2 additions and 13 deletions
-4
View File
@@ -328,10 +328,6 @@ db_print_sbflags(short sb_flags)
db_printf("%sSB_UPCALL", comma ? ", " : "");
comma = 1;
}
if (sb_flags & SB_NOINTR) {
db_printf("%sSB_NOINTR", comma ? ", " : "");
comma = 1;
}
if (sb_flags & SB_AIO) {
db_printf("%sSB_AIO", comma ? ", " : "");
comma = 1;
+1 -2
View File
@@ -456,8 +456,7 @@ sbwait(struct socket *so, sb_which which)
sb = sobuf(so, which);
sb->sb_flags |= SB_WAIT;
return (msleep_sbt(&sb->sb_acc, soeventmtx(so, which),
(sb->sb_flags & SB_NOINTR) ? PSOCK : PSOCK | PCATCH, "sbwait",
sb->sb_timeo, 0, 0));
PSOCK | PCATCH, "sbwait", sb->sb_timeo, 0, 0));
}
/*
-6
View File
@@ -161,12 +161,6 @@ nb_connect_in(struct nbpcb *nbp, struct sockaddr_in *to, struct thread *td)
goto bad;
nb_setsockopt_int(so, SOL_SOCKET, SO_KEEPALIVE, 1);
nb_setsockopt_int(so, IPPROTO_TCP, TCP_NODELAY, 1);
SOCKBUF_LOCK(&so->so_rcv);
so->so_rcv.sb_flags &= ~SB_NOINTR;
SOCKBUF_UNLOCK(&so->so_rcv);
SOCKBUF_LOCK(&so->so_snd);
so->so_snd.sb_flags &= ~SB_NOINTR;
SOCKBUF_UNLOCK(&so->so_snd);
error = soconnect(so, (struct sockaddr*)to, td);
if (error)
goto bad;
+1 -1
View File
@@ -40,7 +40,7 @@
#define SB_SEL 0x08 /* someone is selecting */
#define SB_ASYNC 0x10 /* ASYNC I/O, need signals */
#define SB_UPCALL 0x20 /* someone wants an upcall */
#define SB_NOINTR 0x40 /* operations not interruptible */
/* was SB_NOINTR 0x40 */
#define SB_AIO 0x80 /* AIO operations queued */
#define SB_KNOTE 0x100 /* kernel note attached */
#define SB_NOCOALESCE 0x200 /* don't coalesce new data into existing mbufs */