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

/linux-master/tools/lib/api/fd/
H A Darray.c13 void fdarray__init(struct fdarray *fda, int nr_autogrow) argument
15 fda->entries = NULL;
16 fda->priv = NULL;
17 fda->nr = fda->nr_alloc = 0;
18 fda->nr_autogrow = nr_autogrow;
21 int fdarray__grow(struct fdarray *fda, int nr) argument
24 int nr_alloc = fda->nr_alloc + nr;
25 size_t psize = sizeof(fda->priv[0]) * nr_alloc;
27 struct pollfd *entries = realloc(fda
49 struct fdarray *fda = calloc(1, sizeof(*fda)); local
63 fdarray__exit(struct fdarray *fda) argument
70 fdarray__delete(struct fdarray *fda) argument
76 fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags) argument
91 fdarray__dup_entry_from(struct fdarray *fda, int pos, struct fdarray *from) argument
108 fdarray__filter(struct fdarray *fda, short revents, void (*entry_destructor)(struct fdarray *fda, int fd, void *arg), void *arg) argument
136 fdarray__poll(struct fdarray *fda, int timeout) argument
141 fdarray__fprintf(struct fdarray *fda, FILE *fp) argument
[all...]
H A Darray.h16 * I.e. using 'fda->priv[N].idx = * value' where N < fda->nr is ok,
17 * but doing 'fda->priv = malloc(M)' is not allowed.
39 void fdarray__init(struct fdarray *fda, int nr_autogrow);
40 void fdarray__exit(struct fdarray *fda);
43 void fdarray__delete(struct fdarray *fda);
45 int fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags);
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, shor
54 fdarray__available_entries(struct fdarray *fda) argument
[all...]
/linux-master/tools/perf/tests/
H A Dfdarray.c7 static void fdarray__init_revents(struct fdarray *fda, short revents) argument
11 fda->nr = fda->nr_alloc;
13 for (fd = 0; fd < fda->nr; ++fd) {
14 fda->entries[fd].fd = fda->nr - fd;
15 fda->entries[fd].events = revents;
16 fda->entries[fd].revents = revents;
20 static int fdarray__fprintf_prefix(struct fdarray *fda, const char *prefix, FILE *fp) argument
28 return printed + fdarray__fprintf(fda, f
34 struct fdarray *fda = fdarray__new(5, 5); local
95 struct fdarray *fda = fdarray__new(2, 2); local
[all...]
/linux-master/tools/perf/
H A Dbuiltin-daemon.c1257 struct fdarray fda; local
1293 fdarray__init(&fda, 3);
1307 sock_pos = fdarray__add(&fda, sock_fd, POLLIN|POLLERR|POLLHUP, 0);
1311 file_pos = fdarray__add(&fda, conf_fd, POLLIN|POLLERR|POLLHUP, 0);
1315 signal_pos = fdarray__add(&fda, signal_fd, POLLIN|POLLERR|POLLHUP, 0);
1326 if (!err && fdarray__poll(&fda, -1)) {
1329 if (fda.entries[sock_pos].revents & POLLIN)
1331 if (fda.entries[file_pos].revents & POLLIN)
1333 if (fda.entries[signal_pos].revents & POLLIN)
1342 fdarray__exit(&fda);
[all...]
H A Dbuiltin-record.c1199 struct fdarray *fda = &evlist->core.pollfd; local
1202 for (i = 0; i < fda->nr; i++) {
1203 if (!(fda->priv[i].flags & fdarray_flag__non_perf_event))
1205 ret = fdarray__dup_entry_from(&thread_data->pollfd, i, fda);
1211 thread_data, ret, fda->entries[i].fd);
1661 static void record__thread_munmap_filtered(struct fdarray *fda, int fd, argument
1664 struct perf_mmap *map = fda->priv[fd].ptr;
H A Dbuiltin-kvm.c1506 struct fdarray *fda = &kvm->evlist->core.pollfd; local
1517 if (fda->entries[nr_stdin].revents & POLLIN)
/linux-master/drivers/android/
H A Dbinder.c2043 struct binder_fd_array_object *fda; local
2061 fda = to_binder_fd_array_object(hdr);
2063 fda->parent,
2072 fd_buf_size = sizeof(u32) * fda->num_fds;
2073 if (fda->num_fds >= SIZE_MAX / sizeof(u32)) {
2075 debug_id, (u64)fda->num_fds);
2079 fda->parent_offset > parent->length - fd_buf_size) {
2082 debug_id, (u64)fda->num_fds);
2093 fda->parent_offset;
2094 for (fd_index = 0; fd_index < fda
2573 binder_translate_fd_array(struct list_head *pf_head, struct binder_fd_array_object *fda, const void __user *sender_ubuffer, struct binder_buffer_object *parent, struct binder_buffer_object *sender_uparent, struct binder_transaction *t, struct binder_thread *thread, struct binder_transaction *in_reply_to) argument
3447 struct binder_fd_array_object *fda = local
[all...]
/linux-master/tools/testing/selftests/net/
H A Dmsg_zerocopy.c159 int fda = fd; local
161 fd = accept(fda, NULL, NULL);
164 if (close(fda))
/linux-master/tools/lib/perf/
H A Devlist.c359 static void perf_evlist__munmap_filtered(struct fdarray *fda, int fd, argument
362 struct perf_mmap *map = fda->priv[fd].ptr;

Completed in 179 milliseconds