/linux/tools/leds/ |
H A D | led_hw_brightness_mon.c | 30 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/arch/um/os-Linux/ |
H A D | sigio.c | 38 struct pollfd *poll; 54 struct pollfd *p; in write_sigio_thread() 106 struct pollfd *new; in need_poll() 111 new = uml_kmalloc(n * sizeof(struct pollfd), UM_GFP_ATOMIC); in need_poll() 118 memcpy(new, polls->poll, polls->used * sizeof(struct pollfd)); in need_poll() 170 struct pollfd *p; in __add_sigio_fd() 193 current_poll.used * sizeof(struct pollfd)); in __add_sigio_fd() 215 struct pollfd *p; in __ignore_sigio_fd() 260 static struct pollfd *setup_initial_poll(int fd) in setup_initial_poll() 262 struct pollfd *p; in setup_initial_poll() [all …]
|
/linux/tools/testing/selftests/mm/ |
H A D | uffd-common.c | 508 struct pollfd pollfd[2]; in uffd_poll_thread() local 517 pollfd[0].fd = uffd; in uffd_poll_thread() 518 pollfd[0].events = POLLIN; in uffd_poll_thread() 519 pollfd[1].fd = pipefd[cpu*2]; in uffd_poll_thread() 520 pollfd[1].events = POLLIN; in uffd_poll_thread() 525 ret = poll(pollfd, 2, -1); in uffd_poll_thread() 531 if (pollfd[1].revents) { in uffd_poll_thread() 532 if (!(pollfd[1].revents & POLLIN)) in uffd_poll_thread() 533 err("pollfd[1].revents %d", pollfd[1].revents); in uffd_poll_thread() 534 if (read(pollfd[1].fd, &tmp_chr, 1) != 1) in uffd_poll_thread() [all …]
|
/linux/tools/testing/selftests/powerpc/tm/ |
H A D | tm-signal-pagefault.c | 88 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 D | array.c | 26 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 D | array.h | 7 struct pollfd; 23 struct pollfd *entries;
|
/linux/tools/lib/perf/ |
H A D | evlist.c | 32 fdarray__init(&evlist->pollfd, 64); in perf_evlist__init() 173 fdarray__exit(&evlist->pollfd); in perf_evlist__exit() 353 if (fdarray__available_entries(&evlist->pollfd) < nfds && in perf_evlist__alloc_pollfd() 354 fdarray__grow(&evlist->pollfd, nfds) < 0) in perf_evlist__alloc_pollfd() 363 int pos = fdarray__add(&evlist->pollfd, fd, revent | POLLERR | POLLHUP, flags); in perf_evlist__add_pollfd() 366 evlist->pollfd.priv[pos].ptr = ptr; in perf_evlist__add_pollfd() 384 return fdarray__filter(&evlist->pollfd, revents_and_mask, in perf_evlist__filter_pollfd() 390 return fdarray__poll(&evlist->pollfd, timeout); in perf_evlist__poll() 673 if (evlist->pollfd.entries == NULL && perf_evlist__alloc_pollfd(evlist) < 0) in perf_evlist__mmap_ops()
|
/linux/tools/perf/util/ |
H A D | intel-tpebs.c | 267 struct pollfd pollfd = { .events = POLLIN, }; in tpebs_start() local 303 pollfd.fd = ack_fd[0]; in tpebs_start() 310 if (!poll(&pollfd, 1, 3000)) { in tpebs_start() 316 if (!(pollfd.revents & POLLIN)) { in tpebs_start()
|
/linux/fs/ |
H A D | select.c | 841 struct pollfd entries[] __counted_by(len); 844 #define POLLFD_PER_PAGE ((PAGE_SIZE-sizeof(struct poll_list)) / sizeof(struct pollfd)) 853 static inline __poll_t do_pollfd(struct pollfd *pollfd, poll_table *pwait, in do_pollfd() argument 857 int fd = pollfd->fd; in do_pollfd() 868 filter = demangle_poll(pollfd->events) | EPOLLERR | EPOLLHUP; in do_pollfd() 900 struct pollfd * pfd, * pfd_end; in do_poll() 965 sizeof(struct pollfd)) 967 static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, in do_sys_poll() 992 sizeof(struct pollfd) * walk->len)) in do_sys_poll() 1016 struct pollfd *fds = walk->entries; in do_sys_poll() [all …]
|
/linux/include/linux/ |
H A D | restart_block.h | 14 struct pollfd; 50 struct pollfd __user *ufds;
|
/linux/tools/perf/ |
H A D | builtin-daemon.c | 447 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 D | builtin-ftrace.c | 626 struct pollfd pollfd = { in __cmd_ftrace() local 667 pollfd.fd = trace_fd; in __cmd_ftrace() 690 if (poll(&pollfd, 1, -1) < 0) in __cmd_ftrace() 693 if (pollfd.revents & POLLIN) { in __cmd_ftrace() 997 struct pollfd pollfd = { in __cmd_latency() local 1007 pollfd.fd = trace_fd; in __cmd_latency() 1016 if (poll(&pollfd, 1, -1) < 0) in __cmd_latency() 1019 if (pollfd.revents & POLLIN) { in __cmd_latency()
|
/linux/tools/perf/bench/ |
H A D | sched-messaging.c | 82 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 D | request-func-poll.rst | 22 .. 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/net/ |
H A D | txtimestamp.c | 302 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/tools/testing/selftests/seccomp/ |
H A D | seccomp_bpf.c | 3374 struct pollfd pollfd; in TEST() local 3429 pollfd.fd = listener; in TEST() 3430 pollfd.events = POLLIN | POLLOUT; in TEST() 3432 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST() 3433 EXPECT_EQ(pollfd.revents, POLLIN); in TEST() 3448 pollfd.fd = listener; in TEST() 3449 pollfd.events = POLLIN | POLLOUT; in TEST() 3451 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST() 3452 EXPECT_EQ(pollfd.revents, POLLOUT); in TEST() 3833 struct pollfd pollfd; in TEST() local [all …]
|
/linux/Documentation/userspace-api/media/cec/ |
H A D | cec-func-poll.rst | 22 .. 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/filesystems/epoll/ |
H A D | epoll_wakeup_test.c | 63 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/include/uapi/asm-generic/ |
H A D | poll.h | 36 struct pollfd { struct
|
/linux/tools/testing/selftests/ftrace/ |
H A D | poll.c | 24 struct pollfd pfd = {.events = POLLIN}; in main()
|
/linux/tools/testing/selftests/cgroup/ |
H A D | wait_inotify.c | 33 struct pollfd fds = { .events = POLLIN, }; in main()
|
/linux/tools/testing/selftests/pidfd/ |
H A D | pidfd_poll_test.c | 28 struct pollfd fds; in main()
|
/linux/tools/virtio/virtio-trace/ |
H A D | trace-agent-ctl.c | 50 struct pollfd poll_fd; in wait_order()
|
/linux/tools/testing/selftests/alsa/ |
H A D | mixer-test.c | 38 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 D | gpio-watch.c | 27 struct pollfd pfd; in main()
|