summaryrefslogtreecommitdiff
path: root/sys/compat/linux/common/linux_socket.c
diff options
context:
space:
mode:
authorozaki-r <ozaki-r@NetBSD.org>2016-06-16 02:38:40 +0000
committerozaki-r <ozaki-r@NetBSD.org>2016-06-16 02:38:40 +0000
commit41c2e7d1cb5cc7b95dee4c56ba98ed974ee4deb5 (patch)
treec6a9865e3d02d1c169b9cb05884fc9560f4cef55 /sys/compat/linux/common/linux_socket.c
parent1a7bb65c12b2d37002f3e625910326dc3deb45ff (diff)
Use curlwp_bind and curlwp_bindx instead of open-coding LP_BOUND
Diffstat (limited to 'sys/compat/linux/common/linux_socket.c')
-rw-r--r--sys/compat/linux/common/linux_socket.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/linux/common/linux_socket.c b/sys/compat/linux/common/linux_socket.c
index ad62a60e6cc..885dddd1cf8 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.128 2016/06/15 06:01:21 ozaki-r Exp $ */
+/* $NetBSD: linux_socket.c,v 1.129 2016/06/16 02:38:40 ozaki-r 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.128 2016/06/15 06:01:21 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.129 2016/06/16 02:38:40 ozaki-r Exp $");
#if defined(_KERNEL_OPT)
#include "opt_inet.h"
@@ -1124,7 +1124,7 @@ linux_getifconf(struct lwp *l, register_t *retval, void *data)
const int sz = (int)sizeof(ifr);
bool docopy;
int s;
- int bound = curlwp->l_pflag & LP_BOUND;
+ int bound;
struct psref psref;
error = copyin(data, &ifc, sizeof(ifc));
@@ -1137,7 +1137,7 @@ linux_getifconf(struct lwp *l, register_t *retval, void *data)
ifrp = ifc.ifc_req;
}
- curlwp->l_pflag |= LP_BOUND;
+ bound = curlwp_bind();
s = pserialize_read_enter();
IFNET_READER_FOREACH(ifp) {
psref_acquire(&psref, &ifp->if_psref, ifnet_psref_class);
@@ -1172,7 +1172,7 @@ linux_getifconf(struct lwp *l, register_t *retval, void *data)
psref_release(&psref, &ifp->if_psref, ifnet_psref_class);
}
pserialize_read_exit(s);
- curlwp->l_pflag ^= bound ^ LP_BOUND;
+ curlwp_bindx(bound);
if (docopy)
ifc.ifc_len -= space;
@@ -1183,7 +1183,7 @@ linux_getifconf(struct lwp *l, register_t *retval, void *data)
release_exit:
psref_release(&psref, &ifp->if_psref, ifnet_psref_class);
- curlwp->l_pflag ^= bound ^ LP_BOUND;
+ curlwp_bindx(bound);
return error;
}