diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2023-01-22 12:05:45 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2023-01-22 12:05:45 +0000 |
commit | 5c15bbbf77e86abb44b50581f9057ad7eecc08f4 (patch) | |
tree | e6c68e21533dd75f90aca8793d92f7c9dc1738e7 /sys/miscfs | |
parent | f3a571600a43ee07cf10f877ca5d495eb101ce2a (diff) |
Move SS_CANTRCVMORE and SS_RCVATMARK bits from `so_state' to `sb_state' of
receive buffer. As it was done for SS_CANTSENDMORE bit, the definition
kept as is, but now these bits belongs to the `sb_state' of receive
buffer. `sb_state' ored with `so_state' when socket data exporting to the
userland.
ok bluhm@
Diffstat (limited to 'sys/miscfs')
-rw-r--r-- | sys/miscfs/fifofs/fifo_vnops.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/miscfs/fifofs/fifo_vnops.c b/sys/miscfs/fifofs/fifo_vnops.c index 3c60b67fcfe..f3f0e96cdd4 100644 --- a/sys/miscfs/fifofs/fifo_vnops.c +++ b/sys/miscfs/fifofs/fifo_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: fifo_vnops.c,v 1.99 2023/01/21 11:23:23 mvs Exp $ */ +/* $OpenBSD: fifo_vnops.c,v 1.100 2023/01/22 12:05:44 mvs Exp $ */ /* $NetBSD: fifo_vnops.c,v 1.18 1996/03/16 23:52:42 christos Exp $ */ /* @@ -199,7 +199,8 @@ fifo_open(void *v) } if (fip->fi_writers == 1) { solock(rso); - rso->so_state &= ~(SS_CANTRCVMORE|SS_ISDISCONNECTED); + rso->so_state &= ~SS_ISDISCONNECTED; + rso->so_rcv.sb_state &= ~SS_CANTRCVMORE; sounlock(rso); if (fip->fi_readers > 0) wakeup(&fip->fi_readers); @@ -525,7 +526,7 @@ filt_fiforead(struct knote *kn, long hint) soassertlocked(so); kn->kn_data = so->so_rcv.sb_cc; - if (so->so_state & SS_CANTRCVMORE) { + if (so->so_rcv.sb_state & SS_CANTRCVMORE) { kn->kn_flags |= EV_EOF; if (kn->kn_flags & __EV_POLL) { if (so->so_state & SS_ISDISCONNECTED) |