Lines Matching refs:u

178     engine->u.kqueue.fd = -1;  in nxt_kqueue_create()
179 engine->u.kqueue.mchanges = mchanges; in nxt_kqueue_create()
180 engine->u.kqueue.mevents = mevents; in nxt_kqueue_create()
181 engine->u.kqueue.pid = nxt_pid; in nxt_kqueue_create()
183 engine->u.kqueue.changes = nxt_malloc(sizeof(struct kevent) * mchanges); in nxt_kqueue_create()
184 if (engine->u.kqueue.changes == NULL) { in nxt_kqueue_create()
188 engine->u.kqueue.events = nxt_malloc(sizeof(struct kevent) * mevents); in nxt_kqueue_create()
189 if (engine->u.kqueue.events == NULL) { in nxt_kqueue_create()
193 engine->u.kqueue.fd = kqueue(); in nxt_kqueue_create()
194 if (engine->u.kqueue.fd == -1) { in nxt_kqueue_create()
199 nxt_debug(&engine->task, "kqueue(): %d", engine->u.kqueue.fd); in nxt_kqueue_create()
224 fd = engine->u.kqueue.fd; in nxt_kqueue_free()
228 if (fd != -1 && engine->u.kqueue.pid == nxt_pid) { in nxt_kqueue_free()
237 nxt_free(engine->u.kqueue.events); in nxt_kqueue_free()
238 nxt_free(engine->u.kqueue.changes); in nxt_kqueue_free()
240 nxt_memzero(&engine->u.kqueue, sizeof(nxt_kqueue_engine_t)); in nxt_kqueue_free()
304 end = &engine->u.kqueue.changes[engine->u.kqueue.nchanges]; in nxt_kqueue_close()
306 for (kev = engine->u.kqueue.changes; kev < end; kev++) { in nxt_kqueue_close()
423 engine->u.kqueue.fd, ev->file->fd, EVFILT_VNODE, flags, fflags); in nxt_kqueue_enable_file()
450 engine->u.kqueue.fd, ev->fd, filter, flags); in nxt_kqueue_fd_set()
468 nchanges = engine->u.kqueue.nchanges; in nxt_kqueue_get_kevent()
470 if (nxt_slow_path(nchanges >= engine->u.kqueue.mchanges)) { in nxt_kqueue_get_kevent()
473 engine->u.kqueue.fd, nchanges); in nxt_kqueue_get_kevent()
475 ret = kevent(engine->u.kqueue.fd, engine->u.kqueue.changes, nchanges, in nxt_kqueue_get_kevent()
480 engine->u.kqueue.fd, nxt_errno); in nxt_kqueue_get_kevent()
485 engine->u.kqueue.nchanges = 0; in nxt_kqueue_get_kevent()
488 return &engine->u.kqueue.changes[engine->u.kqueue.nchanges++]; in nxt_kqueue_get_kevent()
501 end = &engine->u.kqueue.changes[engine->u.kqueue.nchanges]; in nxt_kqueue_error()
503 for (kev = engine->u.kqueue.changes; kev < end; kev++) { in nxt_kqueue_error()
588 engine->u.kqueue.fd, signo, sigev->name); in nxt_kqueue_add_signal()
597 if (kevent(engine->u.kqueue.fd, &kev, 1, NULL, 0, NULL) == 0) { in nxt_kqueue_add_signal()
623 engine->u.kqueue.post_handler = handler; in nxt_kqueue_enable_post()
625 if (kevent(engine->u.kqueue.fd, &kev, 1, NULL, 0, NULL) == 0) { in nxt_kqueue_enable_post()
630 engine->u.kqueue.fd, nxt_errno); in nxt_kqueue_enable_post()
653 if (kevent(engine->u.kqueue.fd, &kev, 1, NULL, 0, NULL) != 0) { in nxt_kqueue_signal()
655 engine->u.kqueue.fd, nxt_errno); in nxt_kqueue_signal()
690 engine->u.kqueue.fd, engine->u.kqueue.nchanges, timeout); in nxt_kqueue_poll()
692 nevents = kevent(engine->u.kqueue.fd, in nxt_kqueue_poll()
693 engine->u.kqueue.changes, engine->u.kqueue.nchanges, in nxt_kqueue_poll()
694 engine->u.kqueue.events, engine->u.kqueue.mevents, tp); in nxt_kqueue_poll()
700 nxt_debug(&engine->task, "kevent(%d): %d", engine->u.kqueue.fd, nevents); in nxt_kqueue_poll()
706 engine->u.kqueue.fd, err); in nxt_kqueue_poll()
715 engine->u.kqueue.nchanges = 0; in nxt_kqueue_poll()
719 kev = &engine->u.kqueue.events[i]; in nxt_kqueue_poll()
733 engine->u.kqueue.fd, kev->data, kev->ident, kev->filter); in nxt_kqueue_poll()
823 handler = engine->u.kqueue.post_handler; in nxt_kqueue_poll()
834 engine->u.kqueue.fd, kev->filter, kev->ident); in nxt_kqueue_poll()
946 sa = &c->remote->u.sockaddr; in nxt_kqueue_conn_io_accept()