Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F154703995
D18728.id52515.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D18728.id52515.diff
View Options
Index: lib/libc/sys/send.2
===================================================================
--- lib/libc/sys/send.2
+++ lib/libc/sys/send.2
@@ -122,6 +122,7 @@
#define MSG_OOB 0x00001 /* process out-of-band data */
#define MSG_DONTROUTE 0x00004 /* bypass routing, use direct interface */
#define MSG_EOR 0x00008 /* data completes record */
+#define MSG_DONTWAIT 0x00080 /* this message should be nonblocking */
#define MSG_EOF 0x00100 /* data completes transaction */
#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */
.Ed
Index: sys/kern/uipc_socket.c
===================================================================
--- sys/kern/uipc_socket.c
+++ sys/kern/uipc_socket.c
@@ -1522,7 +1522,8 @@
}
if (space < resid + clen &&
(atomic || space < so->so_snd.sb_lowat || space < clen)) {
- if ((so->so_state & SS_NBIO) || (flags & MSG_NBIO)) {
+ if ((so->so_state & SS_NBIO) ||
+ (flags & (MSG_NBIO | MSG_DONTWAIT)) != 0) {
SOCKBUF_UNLOCK(&so->so_snd);
error = EWOULDBLOCK;
goto release;
Index: sys/netinet/sctp_output.c
===================================================================
--- sys/netinet/sctp_output.c
+++ sys/netinet/sctp_output.c
@@ -12836,7 +12836,7 @@
}
}
if (SCTP_SO_IS_NBIO(so)
- || (flags & MSG_NBIO)
+ || (flags & (MSG_NBIO | MSG_DONTWAIT)) != 0
) {
non_blocking = 1;
}
Index: sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
===================================================================
--- sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
+++ sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c
@@ -1124,7 +1124,8 @@
}
if (space < resid &&
(atomic || space < so->so_snd.sb_lowat)) {
- if ((so->so_state & SS_NBIO) || (flags & MSG_NBIO)) {
+ if ((so->so_state & SS_NBIO) ||
+ (flags & (MSG_NBIO | MSG_DONTWAIT)) != 0) {
SOCKBUF_UNLOCK(&so->so_snd);
error = EWOULDBLOCK;
goto release;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 30, 6:34 AM (5 h, 43 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32464712
Default Alt Text
D18728.id52515.diff (1 KB)
Attached To
Mode
D18728: Support MSG_DONTWAIT in sendmsg()
Attached
Detach File
Event Timeline
Log In to Comment