Date: Tue, 14 Sep 2021 13:10:41 GMT From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: fa0463c384b6 - main - socket: De-duplicate SBLOCKWAIT() definitions Message-ID: <202109141310.18EDAfJw039579@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa0463c384b652e1e962d5e8e70396e6a876f01b commit fa0463c384b652e1e962d5e8e70396e6a876f01b Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2021-09-14 13:01:32 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2021-09-14 13:01:32 +0000 socket: De-duplicate SBLOCKWAIT() definitions MFC after: 1 week Sponsored by: The FreeBSD Foundation --- sys/dev/hyperv/hvsock/hv_sock.c | 1 - sys/kern/uipc_socket.c | 2 -- sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c | 2 -- sys/sys/socketvar.h | 2 ++ 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/dev/hyperv/hvsock/hv_sock.c b/sys/dev/hyperv/hvsock/hv_sock.c index b95b8eebb77d..6d5ad4fc6609 100644 --- a/sys/dev/hyperv/hvsock/hv_sock.c +++ b/sys/dev/hyperv/hvsock/hv_sock.c @@ -627,7 +627,6 @@ hvs_trans_disconnect(struct socket *so) return (0); } -#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT) struct hvs_callback_arg { struct uio *uio; struct sockbuf *sb; diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index cbddd80e0546..95222a1ecf7b 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1413,8 +1413,6 @@ sodisconnect(struct socket *so) return (error); } -#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT) - int sosend_dgram(struct socket *so, struct sockaddr *addr, struct uio *uio, struct mbuf *top, struct mbuf *control, int flags, struct thread *td) diff --git a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c index ed9dd1fcb224..973372b21761 100644 --- a/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c +++ b/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c @@ -1047,8 +1047,6 @@ out: return (error); } -#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT) - /* * Send on a socket. If send must go all at once and message is larger than * send buffering, then hard error. Lock against other senders. If must go diff --git a/sys/sys/socketvar.h b/sys/sys/socketvar.h index 57913f7bbd65..18db5e34d3b5 100644 --- a/sys/sys/socketvar.h +++ b/sys/sys/socketvar.h @@ -292,6 +292,8 @@ struct socket { #define SBL_NOINTR 0x00000002 /* Force non-interruptible sleep. */ #define SBL_VALID (SBL_WAIT | SBL_NOINTR) +#define SBLOCKWAIT(f) (((f) & MSG_DONTWAIT) ? 0 : SBL_WAIT) + #define SOCK_IO_SEND_LOCK(so, flags) \ soiolock((so), &(so)->so_snd_sx, (flags)) #define SOCK_IO_SEND_UNLOCK(so) \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109141310.18EDAfJw039579>