Home
last modified time | relevance | path

Searched refs:fda (Results 1 – 9 of 9) sorted by relevance

/linux/tools/lib/api/fd/
A Darray.c17 fda->nr = fda->nr_alloc = 0; in fdarray__init()
49 struct fdarray *fda = calloc(1, sizeof(*fda)); in fdarray__new() local
60 return fda; in fdarray__new()
73 free(fda); in fdarray__delete()
80 if (fda->nr == fda->nr_alloc && in fdarray__add()
81 fdarray__grow(fda, fda->nr_autogrow) < 0) in fdarray__add()
84 fda->entries[fda->nr].fd = fd; in fdarray__add()
85 fda->entries[fda->nr].events = revents; in fdarray__add()
86 fda->priv[fda->nr].flags = flags; in fdarray__add()
87 fda->nr++; in fdarray__add()
[all …]
A Darray.h39 void fdarray__init(struct fdarray *fda, int nr_autogrow);
40 void fdarray__exit(struct fdarray *fda);
43 void fdarray__delete(struct fdarray *fda);
46 int fdarray__dup_entry_from(struct fdarray *fda, int pos, struct fdarray *from);
47 int fdarray__poll(struct fdarray *fda, int timeout);
48 int fdarray__filter(struct fdarray *fda, short revents,
49 void (*entry_destructor)(struct fdarray *fda, int fd, void *arg),
51 int fdarray__grow(struct fdarray *fda, int extra);
52 int fdarray__fprintf(struct fdarray *fda, FILE *fp);
54 static inline int fdarray__available_entries(struct fdarray *fda) in fdarray__available_entries() argument
[all …]
/linux/tools/perf/tests/
A Dfdarray.c11 fda->nr = fda->nr_alloc; in fdarray__init_revents()
13 for (fd = 0; fd < fda->nr; ++fd) { in fdarray__init_revents()
14 fda->entries[fd].fd = fda->nr - fd; in fdarray__init_revents()
36 if (fda == NULL) { in test__fdarray__filter()
43 if (nr_fds != fda->nr_alloc) { in test__fdarray__filter()
45 nr_fds, fda->nr_alloc); in test__fdarray__filter()
53 nr_fds, fda->nr_alloc); in test__fdarray__filter()
87 fdarray__delete(fda); in test__fdarray__filter()
97 if (fda == NULL) { in test__fdarray__add()
134 if (fda->entries == NULL) { in test__fdarray__add()
[all …]
/linux/tools/perf/
A Dbuiltin-daemon.c1258 struct fdarray fda; in __cmd_start() local
1294 fdarray__init(&fda, 3); in __cmd_start()
1308 sock_pos = fdarray__add(&fda, sock_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1312 file_pos = fdarray__add(&fda, conf_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1316 signal_pos = fdarray__add(&fda, signal_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1327 if (!err && fdarray__poll(&fda, -1)) { in __cmd_start()
1330 if (fda.entries[sock_pos].revents & POLLIN) in __cmd_start()
1332 if (fda.entries[file_pos].revents & POLLIN) in __cmd_start()
1334 if (fda.entries[signal_pos].revents & POLLIN) in __cmd_start()
1343 fdarray__exit(&fda); in __cmd_start()
A Dbuiltin-record.c1209 struct fdarray *fda = &evlist->core.pollfd; in record__dup_non_perf_events() local
1212 for (i = 0; i < fda->nr; i++) { in record__dup_non_perf_events()
1213 if (!(fda->priv[i].flags & fdarray_flag__non_perf_event)) in record__dup_non_perf_events()
1215 ret = fdarray__dup_entry_from(&thread_data->pollfd, i, fda); in record__dup_non_perf_events()
1221 thread_data, ret, fda->entries[i].fd); in record__dup_non_perf_events()
1669 static void record__thread_munmap_filtered(struct fdarray *fda, int fd, in record__thread_munmap_filtered() argument
1672 struct perf_mmap *map = fda->priv[fd].ptr; in record__thread_munmap_filtered()
A Dbuiltin-kvm.c1506 struct fdarray *fda = &kvm->evlist->core.pollfd; in kvm_events_live_report() local
1517 if (fda->entries[nr_stdin].revents & POLLIN) in kvm_events_live_report()
/linux/drivers/android/
A Dbinder.c2122 struct binder_fd_array_object *fda; in binder_transaction_buffer_release() local
2142 fda->parent, in binder_transaction_buffer_release()
2172 fda->parent_offset; in binder_transaction_buffer_release()
2667 if (fda->num_fds == 0) in binder_translate_fd_array()
2691 fda->parent_offset; in binder_translate_fd_array()
2693 fda->parent_offset; in binder_translate_fd_array()
3527 struct binder_fd_array_object *fda = in binder_transaction() local
3533 &ptr_object, fda->parent, in binder_transaction()
3548 fda->parent_offset, in binder_transaction()
3583 fda, sizeof(*fda)); in binder_transaction()
[all …]
/linux/tools/testing/selftests/net/
A Dmsg_zerocopy.c161 int fda = fd; in do_accept() local
163 fd = accept(fda, NULL, NULL); in do_accept()
166 if (close(fda)) in do_accept()
/linux/tools/lib/perf/
A Devlist.c359 static void perf_evlist__munmap_filtered(struct fdarray *fda, int fd, in perf_evlist__munmap_filtered() argument
362 struct perf_mmap *map = fda->priv[fd].ptr; in perf_evlist__munmap_filtered()

Completed in 35 milliseconds