FreeBSD/sys/kern/kern_event.c
/*
 * Performs a kevent() call on a temporarily created kqueue. This can be
 * used to perform one-shot polling, similar to poll() and select().
 */
Performs a kevent() call on a temporarily created kqueue. This can be
used to perform one-shot polling, similar to poll() and select().
Performs a kevent () call on a temporarily created kqueue . This can be used to perform one - shot polling similar to poll () and select () .
int
kern_kevent_anonymous(struct thread *td, int nevents,
    struct kevent_copyops *k_ops)
{
	struct kqueue kq = {};
	int error;
	kqueue_init(&kq);
	kq.kq_refcnt = 1;
	error = kqueue_kevent(&kq, td, nevents, nevents, k_ops, NULL);
	kqueue_drain(&kq, td);
	kqueue_destroy(&kq);
	return (error);
}
int kern_kevent_anonymous ( struct thread * td , int nevents , struct kevent_copyops * k_ops ) { struct kqueue kq = { } ; int error ; kqueue_init ( & kq ) ; kq . kq_refcnt = 1 ; error = kqueue_kevent ( & kq , td , nevents , nevents , k_ops , NULL ) ; kqueue_drain ( & kq , td ) ; kqueue_destroy ( & kq ) ; return ( error ) ; }
Performs a kevent() call on a temporarily created kqueue.
Performs a kevent () call on a temporarily created kqueue .