Home
last modified time | relevance | path

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

1234

/linux/tools/leds/
H A 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()
/linux/tools/testing/selftests/mm/
H A Duffd-common.c534 struct pollfd pollfd[2]; in uffd_poll_thread() local
543 pollfd[0].fd = gopts->uffd; in uffd_poll_thread()
544 pollfd[0].events = POLLIN; in uffd_poll_thread()
545 pollfd[1].fd = gopts->pipefd[cpu*2]; in uffd_poll_thread()
546 pollfd[1].events = POLLIN; in uffd_poll_thread()
551 ret = poll(pollfd, 2, -1); in uffd_poll_thread()
557 if (pollfd[1].revents) { in uffd_poll_thread()
558 if (!(pollfd[1].revents & POLLIN)) in uffd_poll_thread()
559 err("pollfd[1].revents %d", pollfd[1].revents); in uffd_poll_thread()
560 if (read(pollfd[1].fd, &tmp_chr, 1) != 1) in uffd_poll_thread()
[all …]
/linux/tools/testing/selftests/powerpc/tm/
H A 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()
/linux/tools/lib/api/fd/
H A 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()
93 struct pollfd *entry; in fdarray__dup_entry_from()
H A Darray.h7 struct pollfd;
23 struct pollfd *entries;
/linux/include/linux/
H A Drestart_block.h14 struct pollfd;
50 struct pollfd __user *ufds;
/linux/tools/lib/perf/
H A Devlist.c32 fdarray__init(&evlist->pollfd, 64); in perf_evlist__init()
216 fdarray__exit(&evlist->pollfd); in perf_evlist__exit()
396 if (fdarray__available_entries(&evlist->pollfd) < nfds && in perf_evlist__alloc_pollfd()
397 fdarray__grow(&evlist->pollfd, nfds) < 0) in perf_evlist__alloc_pollfd()
406 int pos = fdarray__add(&evlist->pollfd, fd, revent | POLLERR | POLLHUP, flags); in perf_evlist__add_pollfd()
409 evlist->pollfd.priv[pos].ptr = ptr; in perf_evlist__add_pollfd()
427 return fdarray__filter(&evlist->pollfd, revents_and_mask, in perf_evlist__filter_pollfd()
433 return fdarray__poll(&evlist->pollfd, timeout); in perf_evlist__poll()
716 if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0) in perf_evlist__mmap_ops()
/linux/tools/perf/
H A Dbuiltin-daemon.c447 struct pollfd pollfd = { in daemon_session__wait() local
456 int err = poll(&pollfd, 1, 1000); in daemon_session__wait()
486 struct pollfd pollfd = { in daemon__wait() local
495 int err = poll(&pollfd, 1, 1000); in daemon__wait()
514 struct pollfd pollfd = { .events = POLLIN, }; in daemon_session__control() local
556 pollfd.fd = ack; in daemon_session__control()
558 if (!poll(&pollfd, 1, 2000)) { in daemon_session__control()
563 if (!(pollfd.revents & POLLIN)) { in daemon_session__control()
H A Dbuiltin-ftrace.c744 struct pollfd pollfd = { in __cmd_ftrace() local
788 pollfd.fd = trace_fd; in __cmd_ftrace()
811 if (poll(&pollfd, 1, -1) < 0) in __cmd_ftrace()
814 if (pollfd.revents & POLLIN) { in __cmd_ftrace()
1129 struct pollfd pollfd = { in __cmd_latency() local
1139 pollfd.fd = trace_fd; in __cmd_latency()
1154 if (poll(&pollfd, 1, -1) < 0) in __cmd_latency()
1157 if (pollfd.revents & POLLIN) { in __cmd_latency()
H A Dbuiltin-record.c110 struct fdarray pollfd; member
1112 fdarray__init(&thread_data->pollfd, 64); in record__thread_data_init_pollfd()
1119 for (f = 0; f < evlist->core.pollfd.nr; f++) { in record__thread_data_init_pollfd()
1120 void *ptr = evlist->core.pollfd.priv[f].ptr; in record__thread_data_init_pollfd()
1123 pos = fdarray__dup_entry_from(&thread_data->pollfd, f, in record__thread_data_init_pollfd()
1124 &evlist->core.pollfd); in record__thread_data_init_pollfd()
1128 thread_data, pos, evlist->core.pollfd.entries[f].fd); in record__thread_data_init_pollfd()
1148 fdarray__exit(&thread_data[t].pollfd); in record__free_thread_data()
1172 struct pollfd *e_entries = evlist->core.pollfd.entries; in record__update_evlist_pollfd_from_thread()
1173 struct pollfd *t_entries = thread_data->pollfd.entries; in record__update_evlist_pollfd_from_thread()
[all …]
/linux/tools/perf/util/
H A Dintel-tpebs.c255 struct pollfd pollfd = { .events = POLLIN, }; in tpebs_send_record_cmd() local
284 pollfd.fd = ack_fd[0]; in tpebs_send_record_cmd()
292 if (!poll(&pollfd, 1, 500)) { in tpebs_send_record_cmd()
305 if (!(pollfd.revents & POLLIN)) { in tpebs_send_record_cmd()
/linux/tools/perf/bench/
H A Dsched-messaging.c82 struct pollfd pollfd = { .fd = wakefd, .events = POLLIN }; in ready() local
89 if (poll(&pollfd, 1, -1) != 1) in ready()
/linux/Documentation/userspace-api/media/mediactl/
H A Drequest-func-poll.rst22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
44 ``revents`` field of the respective struct :c:type:`pollfd`
/linux/tools/testing/selftests/seccomp/
H A Dseccomp_bpf.c3386 struct pollfd pollfd; in TEST() local
3441 pollfd.fd = listener; in TEST()
3442 pollfd.events = POLLIN | POLLOUT; in TEST()
3444 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST()
3445 EXPECT_EQ(pollfd.revents, POLLIN); in TEST()
3460 pollfd.fd = listener; in TEST()
3461 pollfd.events = POLLIN | POLLOUT; in TEST()
3463 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST()
3464 EXPECT_EQ(pollfd.revents, POLLOUT); in TEST()
3849 struct pollfd pollfd; in TEST() local
[all …]
/linux/tools/testing/selftests/net/
H A Dtxtimestamp.c302 struct pollfd pollfd; in __poll() local
305 memset(&pollfd, 0, sizeof(pollfd)); in __poll()
306 pollfd.fd = fd; in __poll()
307 ret = poll(&pollfd, 1, cfg_poll_timeout); in __poll()
/linux/Documentation/userspace-api/media/cec/
H A Dcec-func-poll.rst22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
44 ``revents`` field of the respective struct :c:type:`pollfd`
/linux/include/uapi/asm-generic/
H A Dpoll.h36 struct pollfd { struct
/linux/tools/testing/selftests/filesystems/epoll/
H A Depoll_wakeup_test.c63 struct pollfd pfd; in waiter_entry1ap()
90 struct pollfd pfd; in waiter_entry1op()
117 struct pollfd pfd; in waiter_entry2ap()
305 struct pollfd pfd; in TEST()
344 struct pollfd pfd; in TEST()
384 struct pollfd pfd; in TEST()
430 struct pollfd pfd; in TEST()
1006 struct pollfd pfd; in TEST()
1054 struct pollfd pfd; in TEST()
1102 struct pollfd pfd; in TEST()
[all …]
/linux/tools/testing/selftests/ftrace/
H A Dpoll.c24 struct pollfd pfd = {.events = POLLIN}; in main()
/linux/arch/um/drivers/
H A Dubd_user.c26 static struct pollfd kernel_pollfd;
/linux/tools/testing/selftests/cgroup/
H A Dwait_inotify.c33 struct pollfd fds = { .events = POLLIN, }; in main()
/linux/tools/virtio/virtio-trace/
H A Dtrace-agent-ctl.c50 struct pollfd poll_fd; in wait_order()
/linux/tools/testing/selftests/pidfd/
H A Dpidfd_poll_test.c28 struct pollfd fds; in main()
/linux/tools/testing/selftests/alsa/
H A Dmixer-test.c38 struct pollfd pollfd; member
187 &card_data->pollfd, 1); in find_controls()
218 err = poll(&(ctl->card->pollfd), 1, timeout); in wait_for_event()
229 &(ctl->card->pollfd), in wait_for_event()
/linux/tools/gpio/
H A Dgpio-watch.c27 struct pollfd pfd; in main()

1234