Home
last modified time | relevance | path

Searched refs:pollfd (Results 1 – 25 of 43) sorted by relevance

12

/tools/leds/
Dled_hw_brightness_mon.c30 struct pollfd pollfd; in main() local
55 pollfd.fd = fd; in main()
56 pollfd.events = POLLPRI; in main()
59 ret = poll(&pollfd, 1, -1); in main()
73 ret = lseek(pollfd.fd, 0, SEEK_SET); in main()
/tools/testing/selftests/kvm/
Ddemand_paging_test.c130 struct pollfd pollfd[2]; in uffd_handler_thread_fn() local
135 pollfd[0].fd = uffd; in uffd_handler_thread_fn()
136 pollfd[0].events = POLLIN; in uffd_handler_thread_fn()
137 pollfd[1].fd = pipefd; in uffd_handler_thread_fn()
138 pollfd[1].events = POLLIN; in uffd_handler_thread_fn()
140 r = poll(pollfd, 2, -1); in uffd_handler_thread_fn()
154 if (pollfd[0].revents & POLLERR) { in uffd_handler_thread_fn()
159 if (pollfd[1].revents & POLLIN) { in uffd_handler_thread_fn()
160 r = read(pollfd[1].fd, &tmp_chr, 1); in uffd_handler_thread_fn()
166 if (!pollfd[0].revents & POLLIN) in uffd_handler_thread_fn()
/tools/testing/selftests/filesystems/incfs/
Dutils.c271 struct pollfd pollfd = { in wait_for_pending_reads() local
276 poll_res = poll(&pollfd, 1, timeout_ms); in wait_for_pending_reads()
281 if (!(pollfd.revents | POLLIN)) in wait_for_pending_reads()
299 struct pollfd pollfd = { in wait_for_pending_reads2() local
304 poll_res = poll(&pollfd, 1, timeout_ms); in wait_for_pending_reads2()
309 if (!(pollfd.revents | POLLIN)) in wait_for_pending_reads2()
/tools/testing/selftests/powerpc/tm/
Dtm-signal-pagefault.c88 struct pollfd pollfd; in fault_handler_thread() local
94 pollfd.fd = uffd; in fault_handler_thread()
95 pollfd.events = POLLIN; in fault_handler_thread()
96 if (poll(&pollfd, 1, -1) == -1) { in fault_handler_thread()
/tools/lib/api/fd/
Darray.h7 struct pollfd;
23 struct pollfd *entries;
Darray.c26 size_t size = sizeof(struct pollfd) * nr_alloc; in fdarray__grow()
27 struct pollfd *entries = realloc(fda->entries, size); in fdarray__grow()
38 memset(&entries[fda->nr_alloc], 0, sizeof(struct pollfd) * nr); in fdarray__grow()
/tools/lib/perf/
Devlist.c35 fdarray__init(&evlist->pollfd, 64); in perf_evlist__init()
134 fdarray__exit(&evlist->pollfd); in perf_evlist__exit()
303 if (fdarray__available_entries(&evlist->pollfd) < nfds && in perf_evlist__alloc_pollfd()
304 fdarray__grow(&evlist->pollfd, nfds) < 0) in perf_evlist__alloc_pollfd()
313 int pos = fdarray__add(&evlist->pollfd, fd, revent | POLLERR | POLLHUP, flags); in perf_evlist__add_pollfd()
316 evlist->pollfd.priv[pos].ptr = ptr; in perf_evlist__add_pollfd()
334 return fdarray__filter(&evlist->pollfd, revents_and_mask, in perf_evlist__filter_pollfd()
340 return fdarray__poll(&evlist->pollfd, timeout); in perf_evlist__poll()
589 if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0) in perf_evlist__mmap_ops()
/tools/perf/bench/
Dsched-messaging.c69 struct pollfd pollfd = { .fd = wakefd, .events = POLLIN }; in ready() local
76 if (poll(&pollfd, 1, -1) != 1) in ready()
/tools/testing/selftests/vm/
Duserfaultfd.c696 struct pollfd pollfd[2]; in uffd_poll_thread() local
702 pollfd[0].fd = uffd; in uffd_poll_thread()
703 pollfd[0].events = POLLIN; in uffd_poll_thread()
704 pollfd[1].fd = pipefd[cpu*2]; in uffd_poll_thread()
705 pollfd[1].events = POLLIN; in uffd_poll_thread()
708 ret = poll(pollfd, 2, -1); in uffd_poll_thread()
711 if (pollfd[1].revents & POLLIN) { in uffd_poll_thread()
712 if (read(pollfd[1].fd, &tmp_chr, 1) != 1) in uffd_poll_thread()
716 if (!(pollfd[0].revents & POLLIN)) in uffd_poll_thread()
717 err("pollfd[0].revents %d", pollfd[0].revents); in uffd_poll_thread()
[all …]
/tools/testing/selftests/pidfd/
Dpidfd_poll_test.c28 struct pollfd fds; in main()
/tools/virtio/virtio-trace/
Dtrace-agent-ctl.c50 struct pollfd poll_fd; in wait_order()
/tools/gpio/
Dgpio-watch.c27 struct pollfd pfd; in main()
/tools/testing/selftests/seccomp/
Dseccomp_bpf.c3295 struct pollfd pollfd; in TEST() local
3350 pollfd.fd = listener; in TEST()
3351 pollfd.events = POLLIN | POLLOUT; in TEST()
3353 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST()
3354 EXPECT_EQ(pollfd.revents, POLLIN); in TEST()
3369 pollfd.fd = listener; in TEST()
3370 pollfd.events = POLLIN | POLLOUT; in TEST()
3372 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST()
3373 EXPECT_EQ(pollfd.revents, POLLOUT); in TEST()
3744 struct pollfd pollfd; in TEST() local
[all …]
/tools/testing/selftests/net/
Dtxtimestamp.c298 struct pollfd pollfd; in __poll() local
301 memset(&pollfd, 0, sizeof(pollfd)); in __poll()
302 pollfd.fd = fd; in __poll()
303 ret = poll(&pollfd, 1, cfg_poll_timeout); in __poll()
Dpsock_tpacket.c222 struct pollfd pfd; in walk_v1_v2_rx()
371 struct pollfd pfd; in walk_tx()
584 struct pollfd pfd; in walk_v3_rx()
Dudpgso_bench_rx.c94 struct pollfd pfd; in do_poll()
/tools/perf/
Dbuiltin-ftrace.c573 struct pollfd pollfd = { in __cmd_ftrace() local
635 pollfd.fd = trace_fd; in __cmd_ftrace()
658 if (poll(&pollfd, 1, -1) < 0) in __cmd_ftrace()
661 if (pollfd.revents & POLLIN) { in __cmd_ftrace()
/tools/testing/selftests/bpf/
Dtest_lirc_mode2_user.c113 struct pollfd pfd = { .fd = inputfd, .events = POLLIN }; in main()
/tools/lib/perf/include/internal/
Devlist.h25 struct fdarray pollfd; member
/tools/testing/selftests/filesystems/epoll/
Depoll_wakeup_test.c48 struct pollfd pfd; in waiter_entry1ap()
75 struct pollfd pfd; in waiter_entry1op()
102 struct pollfd pfd; in waiter_entry2ap()
290 struct pollfd pfd; in TEST()
329 struct pollfd pfd; in TEST()
369 struct pollfd pfd; in TEST()
415 struct pollfd pfd; in TEST()
991 struct pollfd pfd; in TEST()
1039 struct pollfd pfd; in TEST()
1087 struct pollfd pfd; in TEST()
[all …]
/tools/testing/selftests/sync/
Dsync.c60 struct pollfd fds; in sync_wait()
/tools/testing/selftests/ir/
Dir_loopback.c167 struct pollfd pfd = { .fd = rlircfd, .events = POLLIN }; in main()
/tools/usb/usbip/src/
Dusbipd.c497 struct pollfd *fds; in do_standalone_mode()
546 fds = calloc(nsockfd, sizeof(struct pollfd)); in do_standalone_mode()
/tools/usb/ffs-aio-example/simple/device_app/
Daio_simple.c169 struct pollfd pfds[1]; in handle_ep0()
/tools/hv/
Dhv_vss_daemon.c213 struct pollfd pfd; in main()

12