/kernel/linux/linux-6.6/tools/testing/selftests/kvm/lib/ |
H A D | userfaultfd_util.c | 41 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[ in uffd_handler_thread_fn() [all...] |
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-6.6/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()
|
/kernel/linux/linux-5.10/arch/um/os-Linux/ |
H A D | sigio.c | 38 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 * in setup_initial_poll() [all...] |
/kernel/linux/linux-6.6/arch/um/os-Linux/ |
H A D | sigio.c | 38 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 * in setup_initial_poll() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/mm/ |
H A D | uffd-common.c | 496 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[ in uffd_poll_thread() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/kvm/ |
H A D | demand_paging_test.c | 130 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[ in uffd_handler_thread_fn() [all...] |
/kernel/linux/linux-5.10/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()
|
/kernel/linux/linux-6.6/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()
|
/kernel/liteos_m/kal/posix/src/ |
H A D | poll.c | 91 STATIC INT32 QueryFds(struct pollfd *fds, nfds_t nfds, struct PollTable *table) in QueryFds() 103 struct pollfd *tmpFds = &fds[i]; in QueryFds() 157 STATIC INLINE INT32 PollTimedWait(struct pollfd *fds, nfds_t nfds, struct PollTable *table, INT32 timeout) in PollTimedWait() 200 int poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll()
|
/kernel/linux/linux-6.6/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;
|
/kernel/liteos_m/kal/libc/newlib/porting/include/ |
H A D | poll.h | 50 struct pollfd { struct 56 int poll(struct pollfd *fds, nfds_t nfds, int timeout);
|
/kernel/linux/linux-5.10/fs/ |
H A D | select.c | 842 struct pollfd entries[]; 845 #define POLLFD_PER_PAGE ((PAGE_SIZE-sizeof(struct poll_list)) / sizeof(struct pollfd)) 848 * Fish for pollable events on the pollfd->fd file descriptor. We're only 849 * interested in events matching the pollfd->events mask, and the result 850 * matching that mask is both recorded in pollfd->revents and returned. The 854 static inline __poll_t do_pollfd(struct pollfd *pollfd, poll_table *pwait, in do_pollfd() argument 858 int fd = pollfd->fd; in do_pollfd() 870 filter = demangle_poll(pollfd->events) | EPOLLERR | EPOLLHUP; in do_pollfd() 880 pollfd in do_pollfd() [all...] |
/kernel/linux/linux-6.6/fs/ |
H A D | select.c | 843 struct pollfd entries[]; 846 #define POLLFD_PER_PAGE ((PAGE_SIZE-sizeof(struct poll_list)) / sizeof(struct pollfd)) 849 * Fish for pollable events on the pollfd->fd file descriptor. We're only 850 * interested in events matching the pollfd->events mask, and the result 851 * matching that mask is both recorded in pollfd->revents and returned. The 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 in do_pollfd() [all...] |
/kernel/linux/linux-5.10/include/linux/ |
H A D | restart_block.h | 14 struct pollfd; 49 struct pollfd __user *ufds;
|
/kernel/linux/linux-6.6/include/linux/ |
H A D | restart_block.h | 14 struct pollfd; 50 struct pollfd __user *ufds;
|
/kernel/linux/linux-5.10/tools/lib/api/fd/ |
H A D | array.h | 7 struct pollfd; 23 struct pollfd *entries;
|
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()
|
/kernel/linux/linux-5.10/tools/lib/perf/ |
H A D | evlist.c | 35 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()
|
/kernel/linux/linux-6.6/tools/lib/perf/ |
H A D | evlist.c | 32 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()
|
/kernel/linux/linux-6.6/tools/perf/ |
H A D | builtin-ftrace.c | 568 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 in __cmd_latency() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/seccomp/ |
H A D | seccomp_bpf.c | 3301 struct pollfd pollfd; in TEST() local 3356 pollfd.fd = listener; in TEST() 3357 pollfd.events = POLLIN | POLLOUT; in TEST() 3359 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST() 3360 EXPECT_EQ(pollfd.revents, POLLIN); in TEST() 3375 pollfd.fd = listener; in TEST() 3376 pollfd.events = POLLIN | POLLOUT; in TEST() 3378 EXPECT_GT(poll(&pollfd, 1, -1), 0); in TEST() 3379 EXPECT_EQ(pollfd in TEST() 3750 struct pollfd pollfd; TEST() local 3834 struct pollfd pollfd; TEST() local 3888 struct pollfd pollfd; TEST() local [all...] |
/kernel/linux/linux-5.10/tools/perf/bench/ |
H A D | sched-messaging.c | 69 struct pollfd pollfd = { .fd = wakefd, .events = POLLIN }; in ready() local 76 if (poll(&pollfd, 1, -1) != 1) in ready()
|
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/ |
H A D | net_socket_test_009.cpp | 54 static void GetReadfds(struct pollfd *fds, int *nfd) in GetReadfds() 138 static int HandleReadfds(struct pollfd *fds, int nfds, int lsfd) in HandleReadfds() 244 struct pollfd readfds[FD_SETSIZE]; in PollTest()
|