Home
last modified time | relevance | path

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

/linux-6.1.9/tools/lib/api/fd/
Darray.c13 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 …]
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);
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, 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);
[all …]
/linux-6.1.9/tools/perf/tests/
Dfdarray.c7 static void fdarray__init_revents(struct fdarray *fda, short revents) in fdarray__init_revents() argument
11 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()
15 fda->entries[fd].events = revents; in fdarray__init_revents()
16 fda->entries[fd].revents = revents; in fdarray__init_revents()
20 static int fdarray__fprintf_prefix(struct fdarray *fda, const char *prefix, FILE *fp) in fdarray__fprintf_prefix() argument
28 return printed + fdarray__fprintf(fda, fp); in fdarray__fprintf_prefix()
34 struct fdarray *fda = fdarray__new(5, 5); in test__fdarray__filter() local
36 if (fda == NULL) { in test__fdarray__filter()
[all …]
/linux-6.1.9/tools/perf/
Dbuiltin-daemon.c1257 struct fdarray fda; in __cmd_start() local
1293 fdarray__init(&fda, 3); in __cmd_start()
1307 sock_pos = fdarray__add(&fda, sock_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1311 file_pos = fdarray__add(&fda, conf_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1315 signal_pos = fdarray__add(&fda, signal_fd, POLLIN|POLLERR|POLLHUP, 0); in __cmd_start()
1326 if (!err && fdarray__poll(&fda, -1)) { in __cmd_start()
1329 if (fda.entries[sock_pos].revents & POLLIN) in __cmd_start()
1331 if (fda.entries[file_pos].revents & POLLIN) in __cmd_start()
1333 if (fda.entries[signal_pos].revents & POLLIN) in __cmd_start()
1342 fdarray__exit(&fda); in __cmd_start()
Dbuiltin-record.c1135 struct fdarray *fda = &evlist->core.pollfd; in record__dup_non_perf_events() local
1138 for (i = 0; i < fda->nr; i++) { in record__dup_non_perf_events()
1139 if (!(fda->priv[i].flags & fdarray_flag__non_perf_event)) in record__dup_non_perf_events()
1141 ret = fdarray__dup_entry_from(&thread_data->pollfd, i, fda); in record__dup_non_perf_events()
1147 thread_data, ret, fda->entries[i].fd); in record__dup_non_perf_events()
1622 static void record__thread_munmap_filtered(struct fdarray *fda, int fd, in record__thread_munmap_filtered() argument
1625 struct perf_mmap *map = fda->priv[fd].ptr; in record__thread_munmap_filtered()
Dbuiltin-kvm.c986 struct fdarray *fda = &kvm->evlist->core.pollfd; in kvm_events_live_report() local
997 if (fda->entries[nr_stdin].revents & POLLIN) in kvm_events_live_report()
/linux-6.1.9/drivers/android/
Dbinder.c2031 struct binder_fd_array_object *fda; in binder_transaction_buffer_release() local
2049 fda = to_binder_fd_array_object(hdr); in binder_transaction_buffer_release()
2051 fda->parent, in binder_transaction_buffer_release()
2060 fd_buf_size = sizeof(u32) * fda->num_fds; in binder_transaction_buffer_release()
2061 if (fda->num_fds >= SIZE_MAX / sizeof(u32)) { in binder_transaction_buffer_release()
2063 debug_id, (u64)fda->num_fds); in binder_transaction_buffer_release()
2067 fda->parent_offset > parent->length - fd_buf_size) { in binder_transaction_buffer_release()
2070 debug_id, (u64)fda->num_fds); in binder_transaction_buffer_release()
2082 fda->parent_offset; in binder_transaction_buffer_release()
2083 for (fd_index = 0; fd_index < fda->num_fds; in binder_transaction_buffer_release()
[all …]
/linux-6.1.9/tools/testing/selftests/net/
Dmsg_zerocopy.c159 int fda = fd; in do_accept() local
161 fd = accept(fda, NULL, NULL); in do_accept()
164 if (close(fda)) in do_accept()
/linux-6.1.9/tools/lib/perf/
Devlist.c338 static void perf_evlist__munmap_filtered(struct fdarray *fda, int fd, in perf_evlist__munmap_filtered() argument
341 struct perf_mmap *map = fda->priv[fd].ptr; in perf_evlist__munmap_filtered()