1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00
freebsd/sys/ofed
Mark Johnston f983298883 socket: Rename sb(un)lock() and interlock with listen(2)
In preparation for moving sockbuf locks into the containing socket,
provide alternative macros for the sockbuf I/O locks:
SOCK_IO_SEND_(UN)LOCK() and SOCK_IO_RECV_(UN)LOCK().  These operate on a
socket rather than a socket buffer.  Note that these locks are used only
to prevent concurrent readers and writters from interleaving I/O.

When locking for I/O, return an error if the socket is a listening
socket.  Currently the check is racy since the sockbuf sx locks are
destroyed during the transition to a listening socket, but that will no
longer be true after some follow-up changes.

Modify a few places to check for errors from
sblock()/SOCK_IO_(SEND|RECV)_LOCK() where they were not before.  In
particular, add checks to sendfile() and sorflush().

Reviewed by:	tuexen, gallatin
Sponsored by:	The FreeBSD Foundation

(cherry picked from commit f94acf52a4)
2021-10-07 09:56:47 -04:00
..
drivers/infiniband socket: Rename sb(un)lock() and interlock with listen(2) 2021-10-07 09:56:47 -04:00
include ibcore: Add some functions and definitions for selecting and querying retryable ucontext cleanup. 2021-07-26 18:04:33 +02:00