Lines Matching refs:fd
73 int fdarray__add(struct fdarray *fda, int fd, short revents) in fdarray__add() argument
81 fda->entries[fda->nr].fd = fd; in fdarray__add()
88 void (*entry_destructor)(struct fdarray *fda, int fd, void *arg), in fdarray__filter()
91 int fd, nr = 0; in fdarray__filter() local
96 for (fd = 0; fd < fda->nr; ++fd) { in fdarray__filter()
97 if (fda->entries[fd].revents & revents) { in fdarray__filter()
99 entry_destructor(fda, fd, arg); in fdarray__filter()
104 if (fd != nr) { in fdarray__filter()
105 fda->entries[nr] = fda->entries[fd]; in fdarray__filter()
106 fda->priv[nr] = fda->priv[fd]; in fdarray__filter()
122 int fd, printed = fprintf(fp, "%d [ ", fda->nr); in fdarray__fprintf() local
124 for (fd = 0; fd < fda->nr; ++fd) in fdarray__fprintf()
125 printed += fprintf(fp, "%s%d", fd ? ", " : "", fda->entries[fd].fd); in fdarray__fprintf()