summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_socket.c
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2011-12-20 23:56:28 +0000
committerchristos <christos@NetBSD.org>2011-12-20 23:56:28 +0000
commit8215bac69642e9dc3d447251dc0e41c8a0777133 (patch)
tree94dbee2a82c1bb1bc839159fa4e933a430dbda46 /sys/compat/linux/common/linux_socket.c
parente8f48658cb9a0302e10328cfcfef3d2259966080 (diff)
- Eliminate so_nbio and turn it into a bit SS_NBIO in so_state.
- Introduce MSG_NBIO so that we can turn non blocking i/o on a per call basis - Use MSG_NBIO to fix the XXX: multi-threaded issues on the fifo sockets. - Don't set SO_CANTRCVMORE, if we were interrupted (perhaps do it for all errors?).
Diffstat (limited to 'sys/compat/linux/common/linux_socket.c')
-rw-r--r--sys/compat/linux/common/linux_socket.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c
index 3860ae588bb..fb35c837a10 100644
--- a/sys/compat/linux/common/linux_socket.c
+++ b/sys/compat/linux/common/linux_socket.c
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_socket.c,v 1.110 2011/07/17 23:59:54 christos Exp $ */
+/* $NetBSD: linux_socket.c,v 1.111 2011/12/20 23:56:28 christos Exp $ */
/*-
* Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.110 2011/07/17 23:59:54 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.111 2011/12/20 23:56:28 christos Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -1376,7 +1376,7 @@ linux_sys_connect(struct lwp *l, const struct linux_sys_connect_args *uap, regis
if (error == EISCONN) {
struct socket *so;
- int state, prflags, nbio;
+ int state, prflags;
/* fd_getsock() will use the descriptor for us */
if (fd_getsock(SCARG(uap, s), &so) != 0)
@@ -1384,7 +1384,6 @@ linux_sys_connect(struct lwp *l, const struct linux_sys_connect_args *uap, regis
solock(so);
state = so->so_state;
- nbio = so->so_nbio;
prflags = so->so_proto->pr_flags;
sounlock(so);
fd_putfile(SCARG(uap, s));
@@ -1393,7 +1392,8 @@ linux_sys_connect(struct lwp *l, const struct linux_sys_connect_args *uap, regis
* non-blocking connect; however we don't have
* a convenient place to keep that state..
*/
- if (nbio && (state & SS_ISCONNECTED) &&
+ if ((state & (SS_ISCONNECTED|SS_NBIO)) ==
+ (SS_ISCONNECTED|SS_NBIO) &&
(prflags & PR_CONNREQUIRED))
return 0;
}