Searched refs:fda (Results 1 – 5 of 5) sorted by relevance
/linux-4.4.14/tools/lib/api/fd/ |
D | array.c | 13 void fdarray__init(struct fdarray *fda, int nr_autogrow) in fdarray__init() argument 15 fda->entries = NULL; in fdarray__init() 16 fda->priv = NULL; in fdarray__init() 17 fda->nr = fda->nr_alloc = 0; in fdarray__init() 18 fda->nr_autogrow = nr_autogrow; in fdarray__init() 21 int fdarray__grow(struct fdarray *fda, int nr) in fdarray__grow() argument 24 int nr_alloc = fda->nr_alloc + nr; in fdarray__grow() 25 size_t psize = sizeof(fda->priv[0]) * nr_alloc; in fdarray__grow() 27 struct pollfd *entries = realloc(fda->entries, size); in fdarray__grow() 32 priv = realloc(fda->priv, psize); in fdarray__grow() [all …]
|
D | array.h | 28 void fdarray__init(struct fdarray *fda, int nr_autogrow); 29 void fdarray__exit(struct fdarray *fda); 32 void fdarray__delete(struct fdarray *fda); 34 int fdarray__add(struct fdarray *fda, int fd, short revents); 35 int fdarray__poll(struct fdarray *fda, int timeout); 36 int fdarray__filter(struct fdarray *fda, short revents, 37 void (*entry_destructor)(struct fdarray *fda, int fd)); 38 int fdarray__grow(struct fdarray *fda, int extra); 39 int fdarray__fprintf(struct fdarray *fda, FILE *fp); 41 static inline int fdarray__available_entries(struct fdarray *fda) in fdarray__available_entries() argument [all …]
|
/linux-4.4.14/tools/perf/tests/ |
D | fdarray.c | 5 static void fdarray__init_revents(struct fdarray *fda, short revents) in fdarray__init_revents() argument 9 fda->nr = fda->nr_alloc; in fdarray__init_revents() 11 for (fd = 0; fd < fda->nr; ++fd) { in fdarray__init_revents() 12 fda->entries[fd].fd = fda->nr - fd; in fdarray__init_revents() 13 fda->entries[fd].revents = revents; in fdarray__init_revents() 17 static int fdarray__fprintf_prefix(struct fdarray *fda, const char *prefix, FILE *fp) in fdarray__fprintf_prefix() argument 25 return printed + fdarray__fprintf(fda, fp); in fdarray__fprintf_prefix() 31 struct fdarray *fda = fdarray__new(5, 5); in test__fdarray__filter() local 33 if (fda == NULL) { in test__fdarray__filter() 38 fdarray__init_revents(fda, POLLIN); in test__fdarray__filter() [all …]
|
/linux-4.4.14/tools/perf/ |
D | builtin-kvm.c | 945 struct fdarray *fda = &kvm->evlist->pollfd; in kvm_events_live_report() local 956 if (fda->entries[nr_stdin].revents & POLLIN) in kvm_events_live_report() 960 err = fdarray__poll(fda, 100); in kvm_events_live_report()
|
/linux-4.4.14/tools/perf/util/ |
D | evlist.c | 515 static void perf_evlist__munmap_filtered(struct fdarray *fda, int fd) in perf_evlist__munmap_filtered() argument 517 struct perf_evlist *evlist = container_of(fda, struct perf_evlist, pollfd); in perf_evlist__munmap_filtered() 519 perf_evlist__mmap_put(evlist, fda->priv[fd].idx); in perf_evlist__munmap_filtered()
|