event.h (156767) | event.h (162594) |
---|---|
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/sys/event.h 156767 2006-03-16 11:19:36Z phk $ | 26 * $FreeBSD: head/sys/sys/event.h 162594 2006-09-24 04:47:47Z jmg $ |
27 */ 28 29#ifndef _SYS_EVENT_H_ 30#define _SYS_EVENT_H_ 31 32#include <sys/queue.h> 33 34#define EVFILT_READ (-1) --- 178 unchanged lines hidden (view full) --- 213extern void knlist_destroy(struct knlist *knl); 214extern void knlist_cleardel(struct knlist *knl, struct thread *td, 215 int islocked, int killkn); 216#define knlist_clear(knl, islocked) \ 217 knlist_cleardel((knl), NULL, (islocked), 0) 218#define knlist_delete(knl, td, islocked) \ 219 knlist_cleardel((knl), (td), (islocked), 1) 220extern void knote_fdclose(struct thread *p, int fd); | 27 */ 28 29#ifndef _SYS_EVENT_H_ 30#define _SYS_EVENT_H_ 31 32#include <sys/queue.h> 33 34#define EVFILT_READ (-1) --- 178 unchanged lines hidden (view full) --- 213extern void knlist_destroy(struct knlist *knl); 214extern void knlist_cleardel(struct knlist *knl, struct thread *td, 215 int islocked, int killkn); 216#define knlist_clear(knl, islocked) \ 217 knlist_cleardel((knl), NULL, (islocked), 0) 218#define knlist_delete(knl, td, islocked) \ 219 knlist_cleardel((knl), (td), (islocked), 1) 220extern void knote_fdclose(struct thread *p, int fd); |
221extern int kqueue_register(struct kqueue *kq, 222 struct kevent *kev, struct thread *p, int waitok); | 221extern int kqfd_register(int fd, struct kevent *kev, struct thread *p, 222 int waitok); |
223extern int kqueue_add_filteropts(int filt, struct filterops *filtops); 224extern int kqueue_del_filteropts(int filt); 225 226#else /* !_KERNEL */ 227 228#include <sys/cdefs.h> 229struct timespec; 230 231__BEGIN_DECLS 232int kqueue(void); 233int kevent(int kq, const struct kevent *changelist, int nchanges, 234 struct kevent *eventlist, int nevents, 235 const struct timespec *timeout); 236__END_DECLS 237 238#endif /* !_KERNEL */ 239 240#endif /* !_SYS_EVENT_H_ */ | 223extern int kqueue_add_filteropts(int filt, struct filterops *filtops); 224extern int kqueue_del_filteropts(int filt); 225 226#else /* !_KERNEL */ 227 228#include <sys/cdefs.h> 229struct timespec; 230 231__BEGIN_DECLS 232int kqueue(void); 233int kevent(int kq, const struct kevent *changelist, int nchanges, 234 struct kevent *eventlist, int nevents, 235 const struct timespec *timeout); 236__END_DECLS 237 238#endif /* !_KERNEL */ 239 240#endif /* !_SYS_EVENT_H_ */ |