Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/kqueue]: src/sys kevent(2): change type of 'nchanges' and 'nevents' from...
details: https://anonhg.NetBSD.org/src/rev/9a8066d67786
branches: kqueue
changeset: 512461:9a8066d67786
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Fri Jun 07 08:22:36 2002 +0000
description:
kevent(2): change type of 'nchanges' and 'nevents' from int to size_t
change discussed on bsd-api list
diffstat:
sys/kern/kern_event.c | 16 +++++++++-------
sys/kern/syscalls.master | 6 +++---
sys/sys/event.h | 6 +++---
3 files changed, 15 insertions(+), 13 deletions(-)
diffs (95 lines):
diff -r 29d33ea559b8 -r 9a8066d67786 sys/kern/kern_event.c
--- a/sys/kern/kern_event.c Tue Apr 09 06:23:47 2002 +0000
+++ b/sys/kern/kern_event.c Fri Jun 07 08:22:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: kern_event.c,v 1.1.1.1.2.13 2002/04/09 06:23:47 jdolecek Exp $ */
+/* $NetBSD: kern_event.c,v 1.1.1.1.2.14 2002/06/07 08:22:36 jdolecek Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon%FreeBSD.org@localhost>
* All rights reserved.
@@ -50,7 +50,7 @@
#include <sys/filedesc.h>
#include <sys/syscallargs.h>
-static int kqueue_scan(struct file *fp, int maxevents,
+static int kqueue_scan(struct file *fp, size_t maxevents,
struct kevent *ulistp, const struct timespec *timeout,
struct proc *p, register_t *retval);
static void kqueue_wakeup(struct kqueue *kq);
@@ -525,16 +525,17 @@
struct sys_kevent_args /* {
syscallarg(int) fd;
syscallarg(const struct kevent *) changelist;
- syscallarg(int) nchanges;
+ syscallarg(size_t) nchanges;
syscallarg(struct kevent *) eventlist;
- syscallarg(int) nevents;
+ syscallarg(size_t) nevents;
syscallarg(const struct timespec *) timeout;
} */ *uap = v;
struct kevent *kevp;
struct kqueue *kq;
struct file *fp;
struct timespec ts;
- int i, n, nerrors, error;
+ size_t i, n;
+ int nerrors, error;
/* check that we're dealing with a kq */
fp = fd_getfile(p->p_fd, SCARG(uap, fd));
@@ -747,14 +748,15 @@
* as appropriate.
*/
static int
-kqueue_scan(struct file *fp, int maxevents, struct kevent *ulistp,
+kqueue_scan(struct file *fp, size_t maxevents, struct kevent *ulistp,
const struct timespec *tsp, struct proc *p, register_t *retval)
{
struct kqueue *kq;
struct kevent *kevp;
struct timeval atv;
struct knote *kn, marker;
- int s, count, timeout, nkev, error;
+ size_t count, nkev;
+ int s, timeout, error;
kq = (struct kqueue *)fp->f_data;
count = maxevents;
diff -r 29d33ea559b8 -r 9a8066d67786 sys/kern/syscalls.master
--- a/sys/kern/syscalls.master Tue Apr 09 06:23:47 2002 +0000
+++ b/sys/kern/syscalls.master Fri Jun 07 08:22:36 2002 +0000
@@ -1,4 +1,4 @@
- $NetBSD: syscalls.master,v 1.110.2.1 2001/07/10 13:45:49 lukem Exp $
+ $NetBSD: syscalls.master,v 1.110.2.2 2002/06/07 08:22:36 jdolecek Exp $
; @(#)syscalls.master 8.2 (Berkeley) 1/13/94
@@ -652,6 +652,6 @@
;
340 STD { int sys_kqueue(void); }
341 STD { int sys_kevent(int fd, \
- const struct kevent *changelist, int nchanges, \
- struct kevent *eventlist, int nevents, \
+ const struct kevent *changelist, size_t nchanges, \
+ struct kevent *eventlist, size_t nevents, \
const struct timespec *timeout); }
diff -r 29d33ea559b8 -r 9a8066d67786 sys/sys/event.h
--- a/sys/sys/event.h Tue Apr 09 06:23:47 2002 +0000
+++ b/sys/sys/event.h Fri Jun 07 08:22:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: event.h,v 1.1.1.1.2.5 2002/04/09 06:19:51 jdolecek Exp $ */
+/* $NetBSD: event.h,v 1.1.1.1.2.6 2002/06/07 08:22:37 jdolecek Exp $ */
/*-
* Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon%FreeBSD.org@localhost>
* All rights reserved.
@@ -209,8 +209,8 @@
__BEGIN_DECLS
#if !defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)
int kqueue __P((void));
-int kevent __P((int kq, const struct kevent *changelist, int nchanges,
- struct kevent *eventlist, int nevents,
+int kevent __P((int kq, const struct kevent *changelist, size_t nchanges,
+ struct kevent *eventlist, size_t nevents,
const struct timespec *timeout));
#endif /* !_POSIX_C_SOURCE */
__END_DECLS
Home |
Main Index |
Thread Index |
Old Index