Lines Matching refs:fd

130     nxt_fd_t  fd;  in nxt_select_enable_read()  local
132 fd = ev->fd; in nxt_select_enable_read()
134 nxt_debug(ev->task, "select enable read: fd:%d", fd); in nxt_select_enable_read()
136 if (fd < 0 || fd >= (nxt_fd_t) FD_SETSIZE) { in nxt_select_enable_read()
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()
157 nxt_fd_t fd; in nxt_select_enable_write() local
159 fd = ev->fd; in nxt_select_enable_write()
161 nxt_debug(ev->task, "select enable write: fd:%d", fd); in nxt_select_enable_write()
163 if (fd < 0 || fd >= (nxt_fd_t) FD_SETSIZE) { in nxt_select_enable_write()
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()
198 nxt_fd_t fd; in nxt_select_disable_read() local
200 fd = ev->fd; in nxt_select_disable_read()
202 nxt_debug(ev->task, "select disable read: fd:%d", fd); in nxt_select_disable_read()
204 if (fd < 0 || fd >= (nxt_fd_t) FD_SETSIZE) { in nxt_select_disable_read()
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()
222 nxt_fd_t fd; in nxt_select_disable_write() local
224 fd = ev->fd; in nxt_select_disable_write()
226 nxt_debug(ev->task, "select disable write: fd:%d", fd); in nxt_select_disable_write()
228 if (fd < 0 || fd >= (nxt_fd_t) FD_SETSIZE) { in nxt_select_disable_write()
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()
285 nxt_uint_t fd, level; in nxt_select_poll() local
330 for (fd = 0; fd < (nxt_uint_t) nfds && nevents != 0; fd++) { 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()
338 fd, ev->read, ev->write); 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()
355 fd, ev->read, ev->write); in nxt_select_poll()