Deleted Added
full compact
kern_event.c (89306) kern_event.c (89319)
1/*-
2 * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
1/*-
2 * Copyright (c) 1999,2000,2001 Jonathan Lemon <jlemon@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 9 unchanged lines hidden (view full) ---

18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 *
26 * $FreeBSD: head/sys/kern/kern_event.c 89306 2002-01-13 11:58:06Z alfred $
26 * $FreeBSD: head/sys/kern/kern_event.c 89319 2002-01-14 00:13:45Z alfred $
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <sys/lock.h>
33#include <sys/mutex.h>
34#include <sys/proc.h>

--- 374 unchanged lines hidden (view full) ---

409kevent(struct thread *td, struct kevent_args *uap)
410{
411 struct kevent *kevp;
412 struct kqueue *kq;
413 struct file *fp;
414 struct timespec ts;
415 int i, n, nerrors, error;
416
27 */
28
29#include <sys/param.h>
30#include <sys/systm.h>
31#include <sys/kernel.h>
32#include <sys/lock.h>
33#include <sys/mutex.h>
34#include <sys/proc.h>

--- 374 unchanged lines hidden (view full) ---

409kevent(struct thread *td, struct kevent_args *uap)
410{
411 struct kevent *kevp;
412 struct kqueue *kq;
413 struct file *fp;
414 struct timespec ts;
415 int i, n, nerrors, error;
416
417 fp = ffind_hold(td, uap->fd);
418 if (fp == NULL || fp->f_type != DTYPE_KQUEUE) {
419 if (fp != NULL)
420 fdrop(fp, td);
417 if ((error = fget(td, uap->fd, &fp)) != 0)
418 return (error);
419 if (fp->f_type != DTYPE_KQUEUE) {
420 fdrop(fp, td);
421 return (EBADF);
422 }
423 if (uap->timeout != NULL) {
424 error = copyin(uap->timeout, &ts, sizeof(ts));
425 if (error)
426 goto done_nogiant;
427 uap->timeout = &ts;
428 }

--- 651 unchanged lines hidden ---
421 return (EBADF);
422 }
423 if (uap->timeout != NULL) {
424 error = copyin(uap->timeout, &ts, sizeof(ts));
425 if (error)
426 goto done_nogiant;
427 uap->timeout = &ts;
428 }

--- 651 unchanged lines hidden ---