Introduce per-sockbuf `sb_state' to use it with SS_CANTSENDMORE.
authormvs <mvs@openbsd.org>
Sat, 21 Jan 2023 11:23:23 +0000 (11:23 +0000)
committermvs <mvs@openbsd.org>
Sat, 21 Jan 2023 11:23:23 +0000 (11:23 +0000)
commit9e437519d14e6170e0318f9c6a86418ef80fadf7
tree07ec5eee551c5487b00122344a088b631d886db7
parent8b8fb239a1ab405615ea2f990046a7054a419f74
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@
sys/kern/kern_sysctl.c
sys/kern/sys_socket.c
sys/kern/uipc_socket.c
sys/kern/uipc_socket2.c
sys/kern/uipc_usrreq.c
sys/miscfs/fifofs/fifo_vnops.c
sys/netinet/tcp_usrreq.c
sys/sys/socketvar.h