Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 2021 13:48:26 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: fefff1bac5e2 - stable/13 - socket: De-duplicate SBLOCKWAIT() definitions
Message-ID:  <202109211348.18LDmQ7n035544@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/13 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=fefff1bac5e20aea79a8acdf1536a34dd58e3fa4

commit fefff1bac5e20aea79a8acdf1536a34dd58e3fa4
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-09-14 13:01:32 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-09-21 13:37:21 +0000

    socket: De-duplicate SBLOCKWAIT() definitions
    
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit fa0463c384b652e1e962d5e8e70396e6a876f01b)
---
 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 00e296fcd335..bdc8974afdbd 100644
--- a/sys/dev/hyperv/hvsock/hv_sock.c
+++ b/sys/dev/hyperv/hvsock/hv_sock.c
@@ -626,7 +626,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 9f4e2fc64e98..dc7407808535 100644
--- a/sys/kern/uipc_socket.c
+++ b/sys/kern/uipc_socket.c
@@ -1370,8 +1370,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 a38bdfcbed59..62e12f3b477c 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 47033fdabbfa..6452716d36de 100644
--- a/sys/sys/socketvar.h
+++ b/sys/sys/socketvar.h
@@ -255,6 +255,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)
+
 /*
  * Do we need to notify the other side when I/O is possible?
  */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109211348.18LDmQ7n035544>