Home
last modified time | relevance | path

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

/kernel/linux/linux-5.10/tools/lib/api/fd/
H A 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 in fdarray__grow()
49 struct fdarray *fda = calloc(1, sizeof(*fda)); fdarray__new() local
63 fdarray__exit(struct fdarray *fda) fdarray__exit() argument
70 fdarray__delete(struct fdarray *fda) fdarray__delete() argument
76 fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags) fdarray__add() argument
91 fdarray__filter(struct fdarray *fda, short revents, void (*entry_destructor)(struct fdarray *fda, int fd, void *arg), void *arg) fdarray__filter() argument
119 fdarray__poll(struct fdarray *fda, int timeout) fdarray__poll() argument
124 fdarray__fprintf(struct fdarray *fda, FILE *fp) fdarray__fprintf() 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.
38 void fdarray__init(struct fdarray *fda, int nr_autogrow);
39 void fdarray__exit(struct fdarray *fda);
42 void fdarray__delete(struct fdarray *fda);
44 int fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags);
45 int fdarray__poll(struct fdarray *fda, int timeout);
46 int fdarray__filter(struct fdarray *fda, short revents,
47 void (*entry_destructor)(struct fdarray *fda, in
52 fdarray__available_entries(struct fdarray *fda) fdarray__available_entries() argument
[all...]
/kernel/linux/linux-6.6/tools/lib/api/fd/
H A 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 in fdarray__grow()
49 struct fdarray *fda = calloc(1, sizeof(*fda)); fdarray__new() local
63 fdarray__exit(struct fdarray *fda) fdarray__exit() argument
70 fdarray__delete(struct fdarray *fda) fdarray__delete() argument
76 fdarray__add(struct fdarray *fda, int fd, short revents, enum fdarray_flags flags) fdarray__add() argument
91 fdarray__dup_entry_from(struct fdarray *fda, int pos, struct fdarray *from) fdarray__dup_entry_from() argument
108 fdarray__filter(struct fdarray *fda, short revents, void (*entry_destructor)(struct fdarray *fda, int fd, void *arg), void *arg) fdarray__filter() argument
136 fdarray__poll(struct fdarray *fda, int timeout) fdarray__poll() argument
141 fdarray__fprintf(struct fdarray *fda, FILE *fp) fdarray__fprintf() 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) fdarray__available_entries() argument
[all...]
/kernel/linux/linux-5.10/tools/perf/tests/
H A 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, f in fdarray__fprintf_prefix()
34 struct fdarray *fda = fdarray__new(5, 5); test__fdarray__filter() local
95 struct fdarray *fda = fdarray__new(2, 2); test__fdarray__add() local
[all...]
/kernel/linux/linux-6.6/tools/perf/tests/
H A 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, f in fdarray__fprintf_prefix()
34 struct fdarray *fda = fdarray__new(5, 5); test__fdarray__filter() local
95 struct fdarray *fda = fdarray__new(2, 2); test__fdarray__add() local
[all...]
/kernel/linux/linux-6.6/tools/perf/
H A 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()
[all...]
H A Dbuiltin-record.c1130 struct fdarray *fda = &evlist->core.pollfd; in record__dup_non_perf_events() local
1133 for (i = 0; i < fda->nr; i++) { in record__dup_non_perf_events()
1134 if (!(fda->priv[i].flags & fdarray_flag__non_perf_event)) in record__dup_non_perf_events()
1136 ret = fdarray__dup_entry_from(&thread_data->pollfd, i, fda); in record__dup_non_perf_events()
1142 thread_data, ret, fda->entries[i].fd); in record__dup_non_perf_events()
1617 static void record__thread_munmap_filtered(struct fdarray *fda, int fd, in record__thread_munmap_filtered() argument
1620 struct perf_mmap *map = fda->priv[fd].ptr; in record__thread_munmap_filtered()
H 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()
/kernel/linux/linux-5.10/drivers/android/
H A Dbinder.c2426 struct binder_fd_array_object *fda; in binder_transaction_buffer_release() local
2444 fda = to_binder_fd_array_object(hdr); in binder_transaction_buffer_release()
2446 fda->parent, in binder_transaction_buffer_release()
2455 fd_buf_size = sizeof(u32) * fda->num_fds; in binder_transaction_buffer_release()
2456 if (fda->num_fds >= SIZE_MAX / sizeof(u32)) { in binder_transaction_buffer_release()
2458 debug_id, (u64)fda->num_fds); in binder_transaction_buffer_release()
2462 fda->parent_offset > parent->length - fd_buf_size) { in binder_transaction_buffer_release()
2465 debug_id, (u64)fda->num_fds); in binder_transaction_buffer_release()
2477 fda->parent_offset; in binder_transaction_buffer_release()
2478 for (fd_index = 0; fd_index < fda in binder_transaction_buffer_release()
2956 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) binder_translate_fd_array() argument
3694 struct binder_fd_array_object *fda = binder_transaction() local
[all...]
/kernel/linux/linux-5.10/tools/testing/selftests/net/
H A 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()
/kernel/linux/linux-6.6/tools/testing/selftests/net/
H A 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()
/kernel/linux/linux-6.6/drivers/android/
H A Dbinder.c2077 struct binder_fd_array_object *fda; in binder_transaction_buffer_release() local
2095 fda = to_binder_fd_array_object(hdr); in binder_transaction_buffer_release()
2097 fda->parent, in binder_transaction_buffer_release()
2106 fd_buf_size = sizeof(u32) * fda->num_fds; in binder_transaction_buffer_release()
2107 if (fda->num_fds >= SIZE_MAX / sizeof(u32)) { in binder_transaction_buffer_release()
2109 debug_id, (u64)fda->num_fds); in binder_transaction_buffer_release()
2113 fda->parent_offset > parent->length - fd_buf_size) { in binder_transaction_buffer_release()
2116 debug_id, (u64)fda->num_fds); in binder_transaction_buffer_release()
2128 fda->parent_offset; in binder_transaction_buffer_release()
2129 for (fd_index = 0; fd_index < fda in binder_transaction_buffer_release()
2608 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) binder_translate_fd_array() argument
3493 struct binder_fd_array_object *fda = binder_transaction() local
[all...]
/kernel/linux/linux-5.10/tools/lib/perf/
H A Devlist.c323 static void perf_evlist__munmap_filtered(struct fdarray *fda, int fd, in perf_evlist__munmap_filtered() argument
326 struct perf_mmap *map = fda->priv[fd].ptr; in perf_evlist__munmap_filtered()
/kernel/linux/linux-6.6/tools/lib/perf/
H A Devlist.c353 static void perf_evlist__munmap_filtered(struct fdarray *fda, int fd, in perf_evlist__munmap_filtered() argument
356 struct perf_mmap *map = fda->priv[fd].ptr; in perf_evlist__munmap_filtered()
/kernel/linux/linux-5.10/tools/perf/
H A Dbuiltin-kvm.c985 struct fdarray *fda = &kvm->evlist->core.pollfd; in kvm_events_live_report() local
996 if (fda->entries[nr_stdin].revents & POLLIN) in kvm_events_live_report()

Completed in 39 milliseconds