Home
last modified time | relevance | path

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

1234

/linux-6.6.21/tools/testing/selftests/kvm/lib/
Duserfaultfd_util.c41 struct pollfd pollfd[2]; in uffd_handler_thread_fn() local
45 pollfd[0].fd = uffd; in uffd_handler_thread_fn()
46 pollfd[0].events = POLLIN; in uffd_handler_thread_fn()
47 pollfd[1].fd = pipefd; in uffd_handler_thread_fn()
48 pollfd[1].events = POLLIN; in uffd_handler_thread_fn()
50 r = poll(pollfd, 2, -1); in uffd_handler_thread_fn()
64 if (pollfd[0].revents & POLLERR) { in uffd_handler_thread_fn()
69 if (pollfd[1].revents & POLLIN) { in uffd_handler_thread_fn()
70 r = read(pollfd[1].fd, &tmp_chr, 1); in uffd_handler_thread_fn()
76 if (!(pollfd[0].revents & POLLIN)) in uffd_handler_thread_fn()
/linux-6.6.21/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()
/linux-6.6.21/arch/um/os-Linux/
Dsigio.c38 struct pollfd *poll;
54 struct pollfd *p; in write_sigio_thread()
105 struct pollfd *new; in need_poll()
110 new = uml_kmalloc(n * sizeof(struct pollfd), UM_GFP_ATOMIC); in need_poll()
117 memcpy(new, polls->poll, polls->used * sizeof(struct pollfd)); in need_poll()
169 struct pollfd *p; in __add_sigio_fd()
192 current_poll.used * sizeof(struct pollfd)); in __add_sigio_fd()
214 struct pollfd *p; in __ignore_sigio_fd()
259 static struct pollfd *setup_initial_poll(int fd) in setup_initial_poll()
261 struct pollfd *p; in setup_initial_poll()
[all …]
/linux-6.6.21/tools/testing/selftests/mm/
Duffd-common.c496 struct pollfd pollfd[2]; in uffd_poll_thread() local
505 pollfd[0].fd = uffd; in uffd_poll_thread()
506 pollfd[0].events = POLLIN; in uffd_poll_thread()
507 pollfd[1].fd = pipefd[cpu*2]; in uffd_poll_thread()
508 pollfd[1].events = POLLIN; in uffd_poll_thread()
511 ret = poll(pollfd, 2, -1); in uffd_poll_thread()
517 if (pollfd[1].revents) { in uffd_poll_thread()
518 if (!(pollfd[1].revents & POLLIN)) in uffd_poll_thread()
519 err("pollfd[1].revents %d", pollfd[1].revents); in uffd_poll_thread()
520 if (read(pollfd[1].fd, &tmp_chr, 1) != 1) in uffd_poll_thread()
[all …]
/linux-6.6.21/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()
/linux-6.6.21/tools/lib/api/fd/
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()
Darray.h7 struct pollfd;
23 struct pollfd *entries;
/linux-6.6.21/include/linux/
Drestart_block.h14 struct pollfd;
50 struct pollfd __user *ufds;
/linux-6.6.21/tools/lib/perf/
Devlist.c32 fdarray__init(&evlist->pollfd, 64); in perf_evlist__init()
159 fdarray__exit(&evlist->pollfd); in perf_evlist__exit()
333 if (fdarray__available_entries(&evlist->pollfd) < nfds && in perf_evlist__alloc_pollfd()
334 fdarray__grow(&evlist->pollfd, nfds) < 0) in perf_evlist__alloc_pollfd()
343 int pos = fdarray__add(&evlist->pollfd, fd, revent | POLLERR | POLLHUP, flags); in perf_evlist__add_pollfd()
346 evlist->pollfd.priv[pos].ptr = ptr; in perf_evlist__add_pollfd()
364 return fdarray__filter(&evlist->pollfd, revents_and_mask, in perf_evlist__filter_pollfd()
370 return fdarray__poll(&evlist->pollfd, timeout); in perf_evlist__poll()
653 if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0) in perf_evlist__mmap_ops()
/linux-6.6.21/fs/
Dselect.c843 struct pollfd entries[];
846 #define POLLFD_PER_PAGE ((PAGE_SIZE-sizeof(struct poll_list)) / sizeof(struct pollfd))
855 static inline __poll_t do_pollfd(struct pollfd *pollfd, poll_table *pwait, in do_pollfd() argument
859 int fd = pollfd->fd; in do_pollfd()
871 filter = demangle_poll(pollfd->events) | EPOLLERR | EPOLLHUP; in do_pollfd()
881 pollfd->revents = mangle_poll(mask); in do_pollfd()
909 struct pollfd * pfd, * pfd_end; in do_poll()
972 sizeof(struct pollfd))
974 static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, in do_sys_poll()
998 sizeof(struct pollfd) * walk->len)) in do_sys_poll()
[all …]
/linux-6.6.21/tools/perf/
Dbuiltin-ftrace.c568 struct pollfd pollfd = { in __cmd_ftrace() local
621 pollfd.fd = trace_fd; in __cmd_ftrace()
644 if (poll(&pollfd, 1, -1) < 0) in __cmd_ftrace()
647 if (pollfd.revents & POLLIN) { in __cmd_ftrace()
883 struct pollfd pollfd = { in __cmd_latency() local
905 pollfd.fd = trace_fd; in __cmd_latency()
914 if (poll(&pollfd, 1, -1) < 0) in __cmd_latency()
917 if (pollfd.revents & POLLIN) { in __cmd_latency()
Dbuiltin-daemon.c446 struct pollfd pollfd = { in daemon_session__wait() local
455 int err = poll(&pollfd, 1, 1000); in daemon_session__wait()
485 struct pollfd pollfd = { in daemon__wait() local
494 int err = poll(&pollfd, 1, 1000); in daemon__wait()
513 struct pollfd pollfd = { .events = POLLIN, }; in daemon_session__control() local
555 pollfd.fd = ack; in daemon_session__control()
557 if (!poll(&pollfd, 1, 2000)) { in daemon_session__control()
562 if (!(pollfd.revents & POLLIN)) { in daemon_session__control()
Dbuiltin-record.c108 struct fdarray pollfd; member
1046 fdarray__init(&thread_data->pollfd, 64); in record__thread_data_init_pollfd()
1053 for (f = 0; f < evlist->core.pollfd.nr; f++) { in record__thread_data_init_pollfd()
1054 void *ptr = evlist->core.pollfd.priv[f].ptr; in record__thread_data_init_pollfd()
1057 pos = fdarray__dup_entry_from(&thread_data->pollfd, f, in record__thread_data_init_pollfd()
1058 &evlist->core.pollfd); in record__thread_data_init_pollfd()
1062 thread_data, pos, evlist->core.pollfd.entries[f].fd); in record__thread_data_init_pollfd()
1082 fdarray__exit(&thread_data[t].pollfd); in record__free_thread_data()
1106 struct pollfd *e_entries = evlist->core.pollfd.entries; in record__update_evlist_pollfd_from_thread()
1107 struct pollfd *t_entries = thread_data->pollfd.entries; in record__update_evlist_pollfd_from_thread()
[all …]
/linux-6.6.21/tools/perf/bench/
Dsched-messaging.c74 struct pollfd pollfd = { .fd = wakefd, .events = POLLIN }; in ready() local
81 if (poll(&pollfd, 1, -1) != 1) in ready()
/linux-6.6.21/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()
/linux-6.6.21/Documentation/userspace-api/media/mediactl/
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-6.6.21/Documentation/userspace-api/media/cec/
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-6.6.21/tools/testing/selftests/seccomp/
Dseccomp_bpf.c3368 struct pollfd pollfd; in TEST() local
3423 pollfd.fd = listener; in TEST()
3424 pollfd.events = POLLIN | POLLOUT; in TEST()
3426 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST()
3427 EXPECT_EQ(pollfd.revents, POLLIN); in TEST()
3442 pollfd.fd = listener; in TEST()
3443 pollfd.events = POLLIN | POLLOUT; in TEST()
3445 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST()
3446 EXPECT_EQ(pollfd.revents, POLLOUT); in TEST()
3820 struct pollfd pollfd; in TEST() local
[all …]
/linux-6.6.21/include/uapi/asm-generic/
Dpoll.h36 struct pollfd { struct
/linux-6.6.21/tools/testing/selftests/filesystems/epoll/
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-6.6.21/arch/um/drivers/
Dubd_user.c26 struct pollfd kernel_pollfd;
/linux-6.6.21/tools/testing/selftests/cgroup/
Dwait_inotify.c33 struct pollfd fds = { .events = POLLIN, }; in main()
/linux-6.6.21/tools/testing/selftests/pidfd/
Dpidfd_poll_test.c28 struct pollfd fds; in main()
/linux-6.6.21/tools/virtio/virtio-trace/
Dtrace-agent-ctl.c50 struct pollfd poll_fd; in wait_order()
/linux-6.6.21/tools/gpio/
Dgpio-watch.c27 struct pollfd pfd; in main()

1234