Home
last modified time | relevance | path

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

/Linux-v4.19/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.h30 void fdarray__init(struct fdarray *fda, int nr_autogrow);
31 void fdarray__exit(struct fdarray *fda);
34 void fdarray__delete(struct fdarray *fda);
36 int fdarray__add(struct fdarray *fda, int fd, short revents);
37 int fdarray__poll(struct fdarray *fda, int timeout);
38 int fdarray__filter(struct fdarray *fda, short revents,
39 void (*entry_destructor)(struct fdarray *fda, int fd, void *arg),
41 int fdarray__grow(struct fdarray *fda, int extra);
42 int fdarray__fprintf(struct fdarray *fda, FILE *fp);
44 static inline int fdarray__available_entries(struct fdarray *fda) in fdarray__available_entries() argument
[all …]
/Linux-v4.19/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].revents = revents; in fdarray__init_revents()
19 static int fdarray__fprintf_prefix(struct fdarray *fda, const char *prefix, FILE *fp) in fdarray__fprintf_prefix() argument
27 return printed + fdarray__fprintf(fda, fp); in fdarray__fprintf_prefix()
33 struct fdarray *fda = fdarray__new(5, 5); in test__fdarray__filter() local
35 if (fda == NULL) { in test__fdarray__filter()
40 fdarray__init_revents(fda, POLLIN); in test__fdarray__filter()
[all …]
/Linux-v4.19/drivers/android/
Dbinder.c2279 struct binder_fd_array_object *fda; in binder_transaction_buffer_release() local
2286 fda = to_binder_fd_array_object(hdr); in binder_transaction_buffer_release()
2287 parent = binder_validate_ptr(buffer, fda->parent, in binder_transaction_buffer_release()
2303 fd_buf_size = sizeof(u32) * fda->num_fds; in binder_transaction_buffer_release()
2304 if (fda->num_fds >= SIZE_MAX / sizeof(u32)) { in binder_transaction_buffer_release()
2306 debug_id, (u64)fda->num_fds); in binder_transaction_buffer_release()
2310 fda->parent_offset > parent->length - fd_buf_size) { in binder_transaction_buffer_release()
2313 debug_id, (u64)fda->num_fds); in binder_transaction_buffer_release()
2316 fd_array = (u32 *)(parent_buffer + (uintptr_t)fda->parent_offset); in binder_transaction_buffer_release()
2317 for (fd_index = 0; fd_index < fda->num_fds; fd_index++) in binder_transaction_buffer_release()
[all …]
/Linux-v4.19/tools/testing/selftests/net/
Dmsg_zerocopy.c160 int fda = fd; in do_accept() local
162 fd = accept(fda, NULL, NULL); in do_accept()
165 if (close(fda)) in do_accept()
/Linux-v4.19/tools/perf/
Dbuiltin-kvm.c978 struct fdarray *fda = &kvm->evlist->pollfd; in kvm_events_live_report() local
989 if (fda->entries[nr_stdin].revents & POLLIN) in kvm_events_live_report()
993 err = fdarray__poll(fda, 100); in kvm_events_live_report()
/Linux-v4.19/tools/perf/util/
Devlist.c476 static void perf_evlist__munmap_filtered(struct fdarray *fda, int fd, in perf_evlist__munmap_filtered() argument
479 struct perf_mmap *map = fda->priv[fd].ptr; in perf_evlist__munmap_filtered()