Lines Matching refs:fds
226 int ff_poll(struct pollfd *fds, nfds_t numfds, int timeout)
248 if (fds[i].fd < 0)
251 if (fds[i].fd >= FD_SETSIZE) {
257 if (fds[i].events & POLLIN)
258 FD_SET(fds[i].fd, &read_set);
259 if (fds[i].events & POLLOUT)
260 FD_SET(fds[i].fd, &write_set);
261 if (fds[i].events & POLLERR)
262 FD_SET(fds[i].fd, &exception_set);
264 if (fds[i].fd >= n)
265 n = fds[i].fd + 1;
285 fds[i].revents = 0;
287 if (FD_ISSET(fds[i].fd, &read_set))
288 fds[i].revents |= POLLIN;
289 if (FD_ISSET(fds[i].fd, &write_set))
290 fds[i].revents |= POLLOUT;
291 if (FD_ISSET(fds[i].fd, &exception_set))
292 fds[i].revents |= POLLERR;