Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys - selcommon/pollcommon: drop redundant l argument.
details: https://anonhg.NetBSD.org/src/rev/4726aa9555b2
branches: trunk
changeset: 748938:4726aa9555b2
user: rmind <rmind%NetBSD.org@localhost>
date: Wed Nov 11 09:48:50 2009 +0000
description:
- selcommon/pollcommon: drop redundant l argument.
- Use cached curlwp->l_fd, instead of p->p_fd.
- Inline selscan/pollscan.
diffstat:
sys/compat/common/kern_time_50.c | 14 +++++-----
sys/compat/linux/common/linux_misc.c | 10 ++++----
sys/compat/linux32/common/linux32_unistd.c | 7 ++---
sys/compat/netbsd32/netbsd32_compat_50.c | 10 ++++----
sys/compat/netbsd32/netbsd32_select.c | 19 +++++++++------
sys/compat/osf1/osf1_generic.c | 9 ++++---
sys/kern/sys_select.c | 36 +++++++++++++----------------
sys/sys/poll.h | 5 ++-
sys/sys/select.h | 6 ++--
9 files changed, 58 insertions(+), 58 deletions(-)
diffs (truncated from 436 to 300 lines):
diff -r 6b67bb2c98df -r 4726aa9555b2 sys/compat/common/kern_time_50.c
--- a/sys/compat/common/kern_time_50.c Wed Nov 11 09:15:42 2009 +0000
+++ b/sys/compat/common/kern_time_50.c Wed Nov 11 09:48:50 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_time_50.c,v 1.11 2009/11/04 21:23:02 rmind Exp $ */
+/* $NetBSD: kern_time_50.c,v 1.12 2009/11/11 09:48:50 rmind Exp $ */
/*-
* Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.11 2009/11/04 21:23:02 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kern_time_50.c,v 1.12 2009/11/11 09:48:50 rmind Exp $");
#ifdef _KERNEL_OPT
#include "opt_aio.h"
@@ -400,7 +400,8 @@
}
int
-compat_50_sys_select(struct lwp *l, const struct compat_50_sys_select_args *uap, register_t *retval)
+compat_50_sys_select(struct lwp *l,
+ const struct compat_50_sys_select_args *uap, register_t *retval)
{
/* {
syscallarg(int) nd;
@@ -422,7 +423,7 @@
ts = &ats;
}
- return selcommon(l, retval, SCARG(uap, nd), SCARG(uap, in),
+ return selcommon(retval, SCARG(uap, nd), SCARG(uap, in),
SCARG(uap, ou), SCARG(uap, ex), ts, NULL);
}
@@ -457,7 +458,7 @@
mask = &amask;
}
- return selcommon(l, retval, SCARG(uap, nd), SCARG(uap, in),
+ return selcommon(retval, SCARG(uap, nd), SCARG(uap, in),
SCARG(uap, ou), SCARG(uap, ex), ts, mask);
}
int
@@ -489,8 +490,7 @@
mask = &amask;
}
- return pollcommon(l, retval, SCARG(uap, fds), SCARG(uap, nfds),
- ts, mask);
+ return pollcommon(retval, SCARG(uap, fds), SCARG(uap, nfds), ts, mask);
}
int
diff -r 6b67bb2c98df -r 4726aa9555b2 sys/compat/linux/common/linux_misc.c
--- a/sys/compat/linux/common/linux_misc.c Wed Nov 11 09:15:42 2009 +0000
+++ b/sys/compat/linux/common/linux_misc.c Wed Nov 11 09:48:50 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux_misc.c,v 1.210 2009/11/04 21:23:02 rmind Exp $ */
+/* $NetBSD: linux_misc.c,v 1.211 2009/11/11 09:48:50 rmind Exp $ */
/*-
* Copyright (c) 1995, 1998, 1999, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.210 2009/11/04 21:23:02 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_misc.c,v 1.211 2009/11/11 09:48:50 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -851,7 +851,8 @@
* 2) select never returns ERESTART on Linux, always return EINTR
*/
int
-linux_select1(struct lwp *l, register_t *retval, int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct linux_timeval *timeout)
+linux_select1(struct lwp *l, register_t *retval, int nfds, fd_set *readfds,
+ fd_set *writefds, fd_set *exceptfds, struct linux_timeval *timeout)
{
struct timespec ts0, ts1, uts, *ts = NULL;
struct linux_timeval ltv;
@@ -884,8 +885,7 @@
nanotime(&ts0);
}
- error = selcommon(l, retval, nfds, readfds, writefds, exceptfds,
- ts, NULL);
+ error = selcommon(retval, nfds, readfds, writefds, exceptfds, ts, NULL);
if (error) {
/*
diff -r 6b67bb2c98df -r 4726aa9555b2 sys/compat/linux32/common/linux32_unistd.c
--- a/sys/compat/linux32/common/linux32_unistd.c Wed Nov 11 09:15:42 2009 +0000
+++ b/sys/compat/linux32/common/linux32_unistd.c Wed Nov 11 09:48:50 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: linux32_unistd.c,v 1.33 2009/06/02 13:00:24 njoly Exp $ */
+/* $NetBSD: linux32_unistd.c,v 1.34 2009/11/11 09:48:51 rmind Exp $ */
/*-
* Copyright (c) 2006 Emmanuel Dreyfus, all rights reserved.
@@ -33,7 +33,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.33 2009/06/02 13:00:24 njoly Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux32_unistd.c,v 1.34 2009/11/11 09:48:51 rmind Exp $");
#include <sys/types.h>
#include <sys/param.h>
@@ -182,8 +182,7 @@
} else
timespecclear(&uts); /* XXX GCC4 */
- error = selcommon(l, retval, nfds,
- readfds, writefds, exceptfds, ts, NULL);
+ error = selcommon(retval, nfds, readfds, writefds, exceptfds, ts, NULL);
if (error) {
/*
diff -r 6b67bb2c98df -r 4726aa9555b2 sys/compat/netbsd32/netbsd32_compat_50.c
--- a/sys/compat/netbsd32/netbsd32_compat_50.c Wed Nov 11 09:15:42 2009 +0000
+++ b/sys/compat/netbsd32/netbsd32_compat_50.c Wed Nov 11 09:48:50 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_compat_50.c,v 1.6 2009/11/04 21:23:03 rmind Exp $ */
+/* $NetBSD: netbsd32_compat_50.c,v 1.7 2009/11/11 09:48:51 rmind Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.6 2009/11/04 21:23:03 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_compat_50.c,v 1.7 2009/11/11 09:48:51 rmind Exp $");
#if defined(_KERNEL_OPT)
#include "opt_sysv.h"
@@ -140,7 +140,7 @@
ts = &ats;
}
- return selcommon(l, retval, SCARG(uap, nd), SCARG_P32(uap, in),
+ return selcommon(retval, SCARG(uap, nd), SCARG_P32(uap, in),
SCARG_P32(uap, ou), SCARG_P32(uap, ex), ts, NULL);
return 0;
}
@@ -724,7 +724,7 @@
mask = &amask;
}
- return selcommon(l, retval, SCARG(uap, nd), SCARG_P32(uap, in),
+ return selcommon(retval, SCARG(uap, nd), SCARG_P32(uap, in),
SCARG_P32(uap, ou), SCARG_P32(uap, ex), ts, mask);
return 0;
}
@@ -758,7 +758,7 @@
mask = &amask;
}
- return pollcommon(l, retval, SCARG_P32(uap, fds),
+ return pollcommon(retval, SCARG_P32(uap, fds),
SCARG(uap, nfds), ts, mask);
}
diff -r 6b67bb2c98df -r 4726aa9555b2 sys/compat/netbsd32/netbsd32_select.c
--- a/sys/compat/netbsd32/netbsd32_select.c Wed Nov 11 09:15:42 2009 +0000
+++ b/sys/compat/netbsd32/netbsd32_select.c Wed Nov 11 09:48:50 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: netbsd32_select.c,v 1.17 2009/03/29 19:21:19 christos Exp $ */
+/* $NetBSD: netbsd32_select.c,v 1.18 2009/11/11 09:48:51 rmind Exp $ */
/*
* Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_select.c,v 1.17 2009/03/29 19:21:19 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_select.c,v 1.18 2009/11/11 09:48:51 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -51,7 +51,8 @@
#include <compat/netbsd32/netbsd32_conv.h>
int
-netbsd32___select50(struct lwp *l, const struct netbsd32___select50_args *uap, register_t *retval)
+netbsd32___select50(struct lwp *l,
+ const struct netbsd32___select50_args *uap, register_t *retval)
{
/* {
syscallarg(int) nd;
@@ -73,12 +74,13 @@
ts = &ats;
}
- return selcommon(l, retval, SCARG(uap, nd), SCARG_P32(uap, in),
+ return selcommon(retval, SCARG(uap, nd), SCARG_P32(uap, in),
SCARG_P32(uap, ou), SCARG_P32(uap, ex), ts, NULL);
}
int
-netbsd32___pselect50(struct lwp *l, const struct netbsd32___pselect50_args *uap, register_t *retval)
+netbsd32___pselect50(struct lwp *l,
+ const struct netbsd32___pselect50_args *uap, register_t *retval)
{
/* {
syscallarg(int) nd;
@@ -107,12 +109,13 @@
mask = &amask;
}
- return selcommon(l, retval, SCARG(uap, nd), SCARG_P32(uap, in),
+ return selcommon(retval, SCARG(uap, nd), SCARG_P32(uap, in),
SCARG_P32(uap, ou), SCARG_P32(uap, ex), ts, mask);
}
int
-netbsd32___pollts50(struct lwp *l, const struct netbsd32___pollts50_args *uap, register_t *retval)
+netbsd32___pollts50(struct lwp *l, const struct netbsd32___pollts50_args *uap,
+ register_t *retval)
{
/* {
syscallarg(struct netbsd32_pollfdp_t) fds;
@@ -139,6 +142,6 @@
mask = &amask;
}
- return pollcommon(l, retval, SCARG_P32(uap, fds),
+ return pollcommon(retval, SCARG_P32(uap, fds),
SCARG(uap, nfds), ts, mask);
}
diff -r 6b67bb2c98df -r 4726aa9555b2 sys/compat/osf1/osf1_generic.c
--- a/sys/compat/osf1/osf1_generic.c Wed Nov 11 09:15:42 2009 +0000
+++ b/sys/compat/osf1/osf1_generic.c Wed Nov 11 09:48:50 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: osf1_generic.c,v 1.15 2009/04/01 03:06:06 dogcow Exp $ */
+/* $NetBSD: osf1_generic.c,v 1.16 2009/11/11 09:48:51 rmind Exp $ */
/*
* Copyright (c) 1999 Christopher G. Demetriou. All rights reserved.
@@ -58,7 +58,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: osf1_generic.c,v 1.15 2009/04/01 03:06:06 dogcow Exp $");
+__KERNEL_RCSID(0, "$NetBSD: osf1_generic.c,v 1.16 2009/11/11 09:48:51 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -159,7 +159,8 @@
}
int
-osf1_sys_select(struct lwp *l, const struct osf1_sys_select_args *uap, register_t *retval)
+osf1_sys_select(struct lwp *l, const struct osf1_sys_select_args *uap,
+ register_t *retval)
{
struct osf1_timeval otv;
struct timespec ats, *ts = NULL;
@@ -176,6 +177,6 @@
ts = &ats;
}
- return selcommon(l, retval, SCARG(uap, nd), SCARG(uap, in),
+ return selcommon(retval, SCARG(uap, nd), SCARG(uap, in),
SCARG(uap, ou), SCARG(uap, ex), ts, NULL);
}
diff -r 6b67bb2c98df -r 4726aa9555b2 sys/kern/sys_select.c
--- a/sys/kern/sys_select.c Wed Nov 11 09:15:42 2009 +0000
+++ b/sys/kern/sys_select.c Wed Nov 11 09:48:50 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sys_select.c,v 1.18 2009/11/01 21:46:09 rmind Exp $ */
+/* $NetBSD: sys_select.c,v 1.19 2009/11/11 09:48:51 rmind Exp $ */
/*-
* Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -70,7 +70,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.18 2009/11/01 21:46:09 rmind Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sys_select.c,v 1.19 2009/11/11 09:48:51 rmind Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -108,9 +108,9 @@
uint32_t sc_mask;
} selcpu_t;
-static int selscan(char *, u_int, register_t *);
-static int pollscan(struct pollfd *, u_int, register_t *);
-static void selclear(void);
+static inline int selscan(char *, u_int, register_t *);
+static inline int pollscan(struct pollfd *, u_int, register_t *);
+static void selclear(void);
Home |
Main Index |
Thread Index |
Old Index