Lines Matching refs:u

71     engine->u.select.nfds = -1;  in nxt_select_create()
72 engine->u.select.update_nfds = 0; in nxt_select_create()
74 engine->u.select.events = nxt_zalloc(FD_SETSIZE * sizeof(nxt_fd_event_t *)); in nxt_select_create()
76 if (engine->u.select.events != NULL) { in nxt_select_create()
91 nxt_free(engine->u.select.events); in nxt_select_free()
93 nxt_memzero(&engine->u.select, sizeof(nxt_select_engine_t)); in nxt_select_free()
144 FD_SET(fd, &engine->u.select.main_read_fd_set); in nxt_select_enable_read()
145 engine->u.select.events[fd] = ev; in nxt_select_enable_read()
147 if (engine->u.select.nfds < fd) { in nxt_select_enable_read()
148 engine->u.select.nfds = fd; in nxt_select_enable_read()
149 engine->u.select.update_nfds = 0; in nxt_select_enable_read()
171 FD_SET(fd, &engine->u.select.main_write_fd_set); in nxt_select_enable_write()
172 engine->u.select.events[fd] = ev; in nxt_select_enable_write()
174 if (engine->u.select.nfds < fd) { in nxt_select_enable_write()
175 engine->u.select.nfds = fd; in nxt_select_enable_write()
176 engine->u.select.update_nfds = 0; in nxt_select_enable_write()
208 FD_CLR(fd, &engine->u.select.main_read_fd_set); in nxt_select_disable_read()
213 engine->u.select.events[fd] = NULL; in nxt_select_disable_read()
214 engine->u.select.update_nfds = 1; in nxt_select_disable_read()
232 FD_CLR(fd, &engine->u.select.main_write_fd_set); in nxt_select_disable_write()
237 engine->u.select.events[fd] = NULL; in nxt_select_disable_write()
238 engine->u.select.update_nfds = 1; in nxt_select_disable_write()
298 if (engine->u.select.update_nfds) { in nxt_select_poll()
299 for (i = engine->u.select.nfds; i >= 0; i--) { in nxt_select_poll()
300 if (engine->u.select.events[i] != NULL) { in nxt_select_poll()
301 engine->u.select.nfds = i; in nxt_select_poll()
302 engine->u.select.update_nfds = 0; in nxt_select_poll()
308 engine->u.select.work_read_fd_set = engine->u.select.main_read_fd_set; in nxt_select_poll()
309 engine->u.select.work_write_fd_set = engine->u.select.main_write_fd_set; in nxt_select_poll()
311 nfds = engine->u.select.nfds + 1; in nxt_select_poll()
315 nevents = select(nfds, &engine->u.select.work_read_fd_set, in nxt_select_poll()
316 &engine->u.select.work_write_fd_set, NULL, tp); in nxt_select_poll()
334 if (FD_ISSET(fd, &engine->u.select.work_read_fd_set)) { in nxt_select_poll()
335 ev = engine->u.select.events[fd]; in nxt_select_poll()
351 if (FD_ISSET(fd, &engine->u.select.work_write_fd_set)) { in nxt_select_poll()
352 ev = engine->u.select.events[fd]; in nxt_select_poll()