Home
last modified time | relevance | path

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

123

/Linux-v5.10/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-v5.10/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()
193 current_poll.used * sizeof(struct pollfd)); in add_sigio_fd()
204 struct pollfd *p; in ignore_sigio_fd()
240 static struct pollfd *setup_initial_poll(int fd) in setup_initial_poll()
242 struct pollfd *p; in setup_initial_poll()
[all …]
/Linux-v5.10/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()
/Linux-v5.10/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-v5.10/fs/
Dselect.c839 struct pollfd entries[];
842 #define POLLFD_PER_PAGE ((PAGE_SIZE-sizeof(struct poll_list)) / sizeof(struct pollfd))
851 static inline __poll_t do_pollfd(struct pollfd *pollfd, poll_table *pwait, in do_pollfd() argument
855 int fd = pollfd->fd; in do_pollfd()
867 filter = demangle_poll(pollfd->events) | EPOLLERR | EPOLLHUP; in do_pollfd()
877 pollfd->revents = mangle_poll(mask); in do_pollfd()
905 struct pollfd * pfd, * pfd_end; in do_poll()
968 sizeof(struct pollfd))
970 static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, in do_sys_poll()
994 sizeof(struct pollfd) * walk->len)) in do_sys_poll()
[all …]
/Linux-v5.10/include/linux/
Drestart_block.h14 struct pollfd;
49 struct pollfd __user *ufds;
/Linux-v5.10/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()
599 if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0) in perf_evlist__mmap_ops()
/Linux-v5.10/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()
/Linux-v5.10/tools/testing/selftests/vm/
Duserfaultfd.c591 struct pollfd pollfd[2]; in uffd_poll_thread() local
597 pollfd[0].fd = uffd; in uffd_poll_thread()
598 pollfd[0].events = POLLIN; in uffd_poll_thread()
599 pollfd[1].fd = pipefd[cpu*2]; in uffd_poll_thread()
600 pollfd[1].events = POLLIN; in uffd_poll_thread()
603 ret = poll(pollfd, 2, -1); in uffd_poll_thread()
612 if (pollfd[1].revents & POLLIN) { in uffd_poll_thread()
613 if (read(pollfd[1].fd, &tmp_chr, 1) != 1) { in uffd_poll_thread()
619 if (!(pollfd[0].revents & POLLIN)) { in uffd_poll_thread()
621 pollfd[0].revents); in uffd_poll_thread()
[all …]
/Linux-v5.10/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()
/Linux-v5.10/tools/testing/selftests/seccomp/
Dseccomp_bpf.c3286 struct pollfd pollfd; in TEST() local
3341 pollfd.fd = listener; in TEST()
3342 pollfd.events = POLLIN | POLLOUT; in TEST()
3344 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST()
3345 EXPECT_EQ(pollfd.revents, POLLIN); in TEST()
3360 pollfd.fd = listener; in TEST()
3361 pollfd.events = POLLIN | POLLOUT; in TEST()
3363 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST()
3364 EXPECT_EQ(pollfd.revents, POLLOUT); in TEST()
3735 struct pollfd pollfd; in TEST() local
[all …]
/Linux-v5.10/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-v5.10/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-v5.10/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-v5.10/include/uapi/asm-generic/
Dpoll.h36 struct pollfd { struct
/Linux-v5.10/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()
/Linux-v5.10/samples/bpf/
Dxsk_fwd.c542 struct pollfd pollfd = { in port_rx_burst() local
547 poll(&pollfd, 1, 0); in port_rx_burst()
569 struct pollfd pollfd = { in port_rx_burst() local
574 poll(&pollfd, 1, 0); in port_rx_burst()
/Linux-v5.10/arch/um/drivers/
Dubd_user.c26 struct pollfd kernel_pollfd;
/Linux-v5.10/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 …]
/Linux-v5.10/tools/virtio/virtio-trace/
Dtrace-agent-ctl.c50 struct pollfd poll_fd; in wait_order()
/Linux-v5.10/tools/testing/selftests/pidfd/
Dpidfd_poll_test.c28 struct pollfd fds; in main()
/Linux-v5.10/tools/gpio/
Dgpio-watch.c26 struct pollfd pfd; in main()
/Linux-v5.10/tools/testing/selftests/bpf/
Dtest_lirc_mode2_user.c113 struct pollfd pfd = { .fd = inputfd, .events = POLLIN }; in main()
/Linux-v5.10/tools/lib/perf/include/internal/
Devlist.h25 struct fdarray pollfd; member

123