Lines Matching refs:u

111     engine->u.poll.mchanges = mchanges;  in nxt_poll_create()
113 engine->u.poll.changes = nxt_malloc(sizeof(nxt_poll_change_t) * mchanges); in nxt_poll_create()
115 if (engine->u.poll.changes != NULL) { in nxt_poll_create()
128 nxt_free(engine->u.poll.set); in nxt_poll_free()
129 nxt_free(engine->u.poll.changes); in nxt_poll_free()
130 nxt_poll_fd_hash_destroy(engine, &engine->u.poll.fd_hash); in nxt_poll_free()
132 nxt_memzero(&engine->u.poll, sizeof(nxt_poll_engine_t)); in nxt_poll_free()
308 if (engine->u.poll.nchanges >= engine->u.poll.mchanges) { in nxt_poll_change()
314 change = &engine->u.poll.changes[engine->u.poll.nchanges++]; in nxt_poll_change()
328 nxt_debug(&engine->task, "poll changes:%ui", engine->u.poll.nchanges); in nxt_poll_commit_changes()
331 change = engine->u.poll.changes; in nxt_poll_commit_changes()
332 end = change + engine->u.poll.nchanges; in nxt_poll_commit_changes()
379 engine->u.poll.nchanges = 0; in nxt_poll_commit_changes()
396 if (engine->u.poll.nfds >= engine->u.poll.max_nfds) { in nxt_poll_set_add()
397 max_nfds = engine->u.poll.max_nfds + 512; /* 4K */ in nxt_poll_set_add()
399 pfd = nxt_realloc(engine->u.poll.set, sizeof(struct pollfd) * max_nfds); in nxt_poll_set_add()
404 engine->u.poll.set = pfd; in nxt_poll_set_add()
405 engine->u.poll.max_nfds = max_nfds; in nxt_poll_set_add()
414 phe->index = engine->u.poll.nfds; in nxt_poll_set_add()
417 pfd = &engine->u.poll.set[engine->u.poll.nfds++]; in nxt_poll_set_add()
428 ret = nxt_lvlhsh_insert(&engine->u.poll.fd_hash, &lhq); in nxt_poll_set_add()
451 engine->u.poll.set[phe->index].events = events; in nxt_poll_set_change()
473 ret = nxt_lvlhsh_delete(&engine->u.poll.fd_hash, &lhq); in nxt_poll_set_delete()
482 engine->u.poll.nfds--; in nxt_poll_set_delete()
483 nfds = engine->u.poll.nfds; in nxt_poll_set_delete()
486 engine->u.poll.set[index] = engine->u.poll.set[nfds]; in nxt_poll_set_delete()
488 phe = nxt_poll_fd_hash_get(engine, engine->u.poll.set[nfds].fd); in nxt_poll_set_delete()
511 if (engine->u.poll.nchanges != 0) { in nxt_poll()
519 engine->u.poll.nfds, timeout); in nxt_poll()
521 nevents = poll(engine->u.poll.set, engine->u.poll.nfds, timeout); in nxt_poll()
535 for (i = 0; i < engine->u.poll.nfds && nevents != 0; i++) { in nxt_poll()
537 pfd = &engine->u.poll.set[i]; in nxt_poll()
646 if (nxt_lvlhsh_find(&engine->u.poll.fd_hash, &lhq) == NXT_OK) { in nxt_poll_fd_hash_get()
669 if (nxt_fast_path(phe->fd == engine->u.poll.set[phe->index].fd)) { in nxt_poll_fd_hash_test()
674 phe->fd, engine->u.poll.set[phe->index].fd); in nxt_poll_fd_hash_test()