1280818Skib/*
2280818Skib * Copyright (c) 2015 The FreeBSD Foundation.
3280818Skib * All rights reserved.
4280818Skib *
5280818Skib * Portions of this software were developed by Konstantin Belousov
6280818Skib * under sponsorship from the FreeBSD Foundation.
7280818Skib *
8280818Skib * Redistribution and use in source and binary forms, with or without
9280818Skib * modification, are permitted provided that the following conditions
10280818Skib * are met:
11280818Skib * 1. Redistributions of source code must retain the above copyright
12280818Skib *    notice(s), this list of conditions and the following disclaimer as
13280818Skib *    the first lines of this file unmodified other than the possible
14280818Skib *    addition of one or more copyright notices.
15280818Skib * 2. Redistributions in binary form must reproduce the above copyright
16280818Skib *    notice(s), this list of conditions and the following disclaimer in
17280818Skib *    the documentation and/or other materials provided with the
18280818Skib *    distribution.
19280818Skib *
20280818Skib * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER(S) ``AS IS'' AND ANY
21280818Skib * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22280818Skib * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23280818Skib * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE
24280818Skib * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25280818Skib * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26280818Skib * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
27280818Skib * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28280818Skib * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
29280818Skib * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30280818Skib * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31280818Skib */
32280818Skib
33280818Skib#include <sys/cdefs.h>
34280818Skib__FBSDID("$FreeBSD$");
35280818Skib
36280818Skib#include <sys/types.h>
37280818Skib#include <sys/event.h>
38280818Skib#include <sys/time.h>
39280818Skib#include "libc_private.h"
40280818Skib
41280818Skib__weak_reference(__sys_kevent, __kevent);
42280818Skib
43280818Skib#pragma weak kevent
44280818Skibint
45280818Skibkevent(int kq, const struct kevent *changelist, int nchanges,
46280818Skib    struct kevent *eventlist, int nevents, const struct timespec *timeout)
47280818Skib{
48280818Skib
49280818Skib	return (((int (*)(int, const struct kevent *, int,
50280818Skib	    struct kevent *, int, const struct timespec *))
51280818Skib	    __libc_interposing[INTERPOS_kevent])(kq, changelist, nchanges,
52280818Skib	   eventlist, nevents, timeout));
53280818Skib}
54