Lines Matching refs:fd
76 int fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags)
84 fda->entries[fda->nr].fd = fd;
101 npos = fdarray__add(fda, entry->fd, entry->events, from->priv[pos].flags);
109 void (*entry_destructor)(struct fdarray *fda, int fd, void *arg),
112 int fd, nr = 0;
117 for (fd = 0; fd < fda->nr; ++fd) {
118 if (!fda->entries[fd].events)
121 if (fda->entries[fd].revents & revents) {
123 entry_destructor(fda, fd, arg);
125 fda->entries[fd].revents = fda->entries[fd].events = 0;
129 if (!(fda->priv[fd].flags & fdarray_flag__nonfilterable))
143 int fd, printed = fprintf(fp, "%d [ ", fda->nr);
145 for (fd = 0; fd < fda->nr; ++fd)
146 printed += fprintf(fp, "%s%d", fd ? ", " : "", fda->entries[fd].fd);