From: Sepherosa Ziehau Date: Wed, 19 Oct 2005 07:51:42 +0000 (+0000) Subject: Change kqueue_scan() interface to take "thread" instead of "proc", because X-Git-Tag: v2.0.1~5794 X-Git-Url: https://gitweb.dragonflybsd.org/dragonfly.git/commitdiff_plain/c0e1b5f2467d38aa5cf667627ab4fb0fb4186794 Change kqueue_scan() interface to take "thread" instead of "proc", because kqueue_scan() does not access any fields of "proc" other than "p_thread" --- diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 5da31b8fb9..ef5707db91 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_event.c,v 1.2.2.10 2004/04/04 07:03:14 cperciva Exp $ - * $DragonFly: src/sys/kern/kern_event.c,v 1.17 2005/09/02 07:16:58 hsu Exp $ + * $DragonFly: src/sys/kern/kern_event.c,v 1.18 2005/10/19 07:51:42 sephe Exp $ */ #include @@ -56,7 +56,7 @@ MALLOC_DEFINE(M_KQUEUE, "kqueue", "memory for kqueue system"); static int kqueue_scan(struct file *fp, int maxevents, struct kevent *ulistp, const struct timespec *timeout, - struct proc *p, int *res); + struct thread *td, int *res); static int kqueue_read(struct file *fp, struct uio *uio, struct ucred *cred, int flags, struct thread *td); static int kqueue_write(struct file *fp, struct uio *uio, @@ -452,7 +452,7 @@ kevent(struct kevent_args *uap) goto done; } - error = kqueue_scan(fp, uap->nevents, uap->eventlist, uap->timeout, p, &uap->sysmsg_result); + error = kqueue_scan(fp, uap->nevents, uap->eventlist, uap->timeout, td, &uap->sysmsg_result); done: if (fp != NULL) fdrop(fp, p->p_thread); @@ -591,9 +591,8 @@ done: static int kqueue_scan(struct file *fp, int maxevents, struct kevent *ulistp, - const struct timespec *tsp, struct proc *p, int *res) + const struct timespec *tsp, struct thread *td, int *res) { - struct thread *td = p->p_thread; struct kqueue *kq = (struct kqueue *)fp->f_data; struct kevent *kevp; struct timeval atv, rtv, ttv;