Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 189171
b: refs/heads/master
c: 71c5c15
h: refs/heads/master
i:
  189169: 12001f3
  189167: 0b53e6f
v: v3
  • Loading branch information
Brandon L Black authored and David S. Miller committed Mar 27, 2010
1 parent a3b610e commit f601a80
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f49c57e141c7f53353e4265a31dc2324e6215037
refs/heads/master: 71c5c1595c04852d6fbf3c4882b47b30b61a4d32
1 change: 1 addition & 0 deletions trunk/include/linux/socket.h
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ struct ucred {
#define MSG_ERRQUEUE 0x2000 /* Fetch message from error queue */
#define MSG_NOSIGNAL 0x4000 /* Do not generate SIGPIPE */
#define MSG_MORE 0x8000 /* Sender will send more */
#define MSG_WAITFORONE 0x10000 /* recvmmsg(): block until 1+ packets avail */

#define MSG_EOF MSG_FIN

Expand Down
4 changes: 4 additions & 0 deletions trunk/net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -2135,6 +2135,10 @@ int __sys_recvmmsg(int fd, struct mmsghdr __user *mmsg, unsigned int vlen,
break;
++datagrams;

/* MSG_WAITFORONE turns on MSG_DONTWAIT after one packet */
if (flags & MSG_WAITFORONE)
flags |= MSG_DONTWAIT;

if (timeout) {
ktime_get_ts(timeout);
*timeout = timespec_sub(end_time, *timeout);
Expand Down

0 comments on commit f601a80

Please sign in to comment.