Lines Matching refs:u

101     engine->u.devpoll.fd = -1;  in nxt_devpoll_create()
102 engine->u.devpoll.mchanges = mchanges; in nxt_devpoll_create()
103 engine->u.devpoll.mevents = mevents; in nxt_devpoll_create()
110 engine->u.devpoll.changes = changes; in nxt_devpoll_create()
121 engine->u.devpoll.write_changes = changes; in nxt_devpoll_create()
123 engine->u.devpoll.events = nxt_malloc(sizeof(struct pollfd) * mevents); in nxt_devpoll_create()
124 if (engine->u.devpoll.events == NULL) { in nxt_devpoll_create()
128 engine->u.devpoll.fd = open("/dev/poll", O_RDWR); in nxt_devpoll_create()
130 if (engine->u.devpoll.fd == -1) { in nxt_devpoll_create()
135 nxt_debug(&engine->task, "open(\"/dev/poll\"): %d", engine->u.devpoll.fd); in nxt_devpoll_create()
152 fd = engine->u.devpoll.fd; in nxt_devpoll_free()
160 nxt_free(engine->u.devpoll.events); in nxt_devpoll_free()
161 nxt_free(engine->u.devpoll.write_changes); in nxt_devpoll_free()
162 nxt_free(engine->u.devpoll.changes); in nxt_devpoll_free()
163 nxt_fd_event_hash_destroy(&engine->u.devpoll.fd_hash); in nxt_devpoll_free()
165 nxt_memzero(&engine->u.devpoll, sizeof(nxt_devpoll_engine_t)); in nxt_devpoll_free()
378 engine->u.devpoll.fd, ev->fd, op, events); in nxt_devpoll_change()
380 if (engine->u.devpoll.nchanges >= engine->u.devpoll.mchanges) { in nxt_devpoll_change()
386 change = &engine->u.devpoll.changes[engine->u.devpoll.nchanges++]; in nxt_devpoll_change()
403 engine->u.devpoll.fd, engine->u.devpoll.nchanges); in nxt_devpoll_commit_changes()
407 write_changes = engine->u.devpoll.write_changes; in nxt_devpoll_commit_changes()
408 change = engine->u.devpoll.changes; in nxt_devpoll_commit_changes()
409 end = change + engine->u.devpoll.nchanges; in nxt_devpoll_commit_changes()
435 change = engine->u.devpoll.changes; in nxt_devpoll_commit_changes()
436 end = change + engine->u.devpoll.nchanges; in nxt_devpoll_commit_changes()
447 engine->u.devpoll.nchanges = 0; in nxt_devpoll_commit_changes()
456 ret = nxt_fd_event_hash_add(&engine->u.devpoll.fd_hash, ev->fd, ev); in nxt_devpoll_commit_changes()
464 nxt_fd_event_hash_delete(&engine->task, &engine->u.devpoll.fd_hash, in nxt_devpoll_commit_changes()
474 engine->u.devpoll.nchanges = 0; in nxt_devpoll_commit_changes()
489 nxt_fd_event_hash_delete(ev->task, &engine->u.devpoll.fd_hash, ev->fd, 1); in nxt_devpoll_change_error()
505 n = ioctl(engine->u.devpoll.fd, DP_ISPOLLED, &pfd); in nxt_devpoll_remove()
508 engine->u.devpoll.fd, fd, n); in nxt_devpoll_remove()
517 engine->u.devpoll.fd, fd, nxt_errno); in nxt_devpoll_remove()
524 engine->u.devpoll.fd, fd); in nxt_devpoll_remove()
539 fd = engine->u.devpoll.fd; in nxt_devpoll_write()
567 if (engine->u.devpoll.nchanges != 0) { in nxt_devpoll_poll()
575 engine->u.devpoll.fd, timeout); in nxt_devpoll_poll()
577 dvp.dp_fds = engine->u.devpoll.events; in nxt_devpoll_poll()
578 dvp.dp_nfds = engine->u.devpoll.mevents; in nxt_devpoll_poll()
581 nevents = ioctl(engine->u.devpoll.fd, DP_POLL, &dvp); in nxt_devpoll_poll()
588 engine->u.devpoll.fd, nevents); in nxt_devpoll_poll()
594 engine->u.devpoll.fd, err); in nxt_devpoll_poll()
601 pfd = &engine->u.devpoll.events[i]; in nxt_devpoll_poll()
605 ev = nxt_fd_event_hash_get(&engine->task, &engine->u.devpoll.fd_hash, in nxt_devpoll_poll()
612 engine->u.devpoll.fd, fd, pfd->events, events); in nxt_devpoll_poll()
624 engine->u.devpoll.fd, fd, pfd->events, events); in nxt_devpoll_poll()