diff options
| author | ozaki-r <ozaki-r@NetBSD.org> | 2016-06-16 02:38:40 +0000 |
|---|---|---|
| committer | ozaki-r <ozaki-r@NetBSD.org> | 2016-06-16 02:38:40 +0000 |
| commit | 41c2e7d1cb5cc7b95dee4c56ba98ed974ee4deb5 (patch) | |
| tree | c6a9865e3d02d1c169b9cb05884fc9560f4cef55 /sys/compat/linux32/common/linux32_socket.c | |
| parent | 1a7bb65c12b2d37002f3e625910326dc3deb45ff (diff) | |
Use curlwp_bind and curlwp_bindx instead of open-coding LP_BOUND
Diffstat (limited to 'sys/compat/linux32/common/linux32_socket.c')
| -rw-r--r-- | sys/compat/linux32/common/linux32_socket.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/compat/linux32/common/linux32_socket.c b/sys/compat/linux32/common/linux32_socket.c index e5b7e8f7e6a..fba2cb24dde 100644 --- a/sys/compat/linux32/common/linux32_socket.c +++ b/sys/compat/linux32/common/linux32_socket.c @@ -1,4 +1,4 @@ -/* $NetBSD: linux32_socket.c,v 1.22 2016/06/15 06:01:21 ozaki-r Exp $ */ +/* $NetBSD: linux32_socket.c,v 1.23 2016/06/16 02:38:40 ozaki-r Exp $ */ /*- * Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved. @@ -33,7 +33,7 @@ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.22 2016/06/15 06:01:21 ozaki-r Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux32_socket.c,v 1.23 2016/06/16 02:38:40 ozaki-r Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -425,7 +425,7 @@ linux32_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)); @@ -438,7 +438,7 @@ linux32_getifconf(struct lwp *l, register_t *retval, void *data) ifrp = NETBSD32PTR64(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); @@ -473,7 +473,7 @@ linux32_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; @@ -484,7 +484,7 @@ linux32_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; } |
