diff options
author | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2023-01-21 11:23:25 +0000 |
---|---|---|
committer | Vitaliy Makkoveev <mvs@cvs.openbsd.org> | 2023-01-21 11:23:25 +0000 |
commit | 096e5c52e45769090e18e89ec7891c7bca35569b (patch) | |
tree | e8a3e13c4bcda7e248d006e42eabbc5fd7ed767d /sys/kern/uipc_usrreq.c | |
parent | 36a58b4698ca257973fa0d094e2442ead091fa2b (diff) |
Introduce per-sockbuf `sb_state' to use it with SS_CANTSENDMORE.
This time, socket's buffer lock requires solock() to be held. As a part of
socket buffers standalone locking work, move socket state bits which
represent its buffers state to per buffer state.
Opposing the previous reverted diff, the SS_CANTSENDMORE definition left
as is, but it used only with `sb_state'. `sb_state' ored with original
`so_state' when socket's data exported to the userland, so the ABI kept as
it was.
Inputs from deraadt@.
ok bluhm@
Diffstat (limited to 'sys/kern/uipc_usrreq.c')
-rw-r--r-- | sys/kern/uipc_usrreq.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/kern/uipc_usrreq.c b/sys/kern/uipc_usrreq.c index e5922a91524..b7d9d633d64 100644 --- a/sys/kern/uipc_usrreq.c +++ b/sys/kern/uipc_usrreq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_usrreq.c,v 1.197 2022/12/12 08:30:22 tb Exp $ */ +/* $OpenBSD: uipc_usrreq.c,v 1.198 2023/01/21 11:23:23 mvs Exp $ */ /* $NetBSD: uipc_usrreq.c,v 1.18 1996/02/09 19:00:50 christos Exp $ */ /* @@ -509,7 +509,7 @@ uipc_send(struct socket *so, struct mbuf *m, struct mbuf *nam, goto out; } - if (so->so_state & SS_CANTSENDMORE) { + if (so->so_snd.sb_state & SS_CANTSENDMORE) { error = EPIPE; goto dispose; } |