/kernel/linux/linux-5.10/drivers/clk/imx/ |
H A D | clk-pfd.c | 37 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_enable() local 39 writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + CLR); in clk_pfd_enable() 46 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_disable() local 48 writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + SET); in clk_pfd_disable() 54 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_recalc_rate() local 56 u8 frac = (readl_relaxed(pfd->reg) >> (pfd->idx * 8)) & 0x3f; in clk_pfd_recalc_rate() 87 struct clk_pfd *pfd in clk_pfd_set_rate() local 107 struct clk_pfd *pfd = to_clk_pfd(hw); clk_pfd_is_enabled() local 127 struct clk_pfd *pfd; imx_clk_hw_pfd() local [all...] |
H A D | clk-pfdv2.c | 43 static int clk_pfdv2_wait(struct clk_pfdv2 *pfd) in clk_pfdv2_wait() argument 47 return readl_poll_timeout(pfd->reg, val, val & (1 << pfd->vld_bit), in clk_pfdv2_wait() 53 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); in clk_pfdv2_enable() local 58 val = readl_relaxed(pfd->reg); in clk_pfdv2_enable() 59 val &= ~(1 << pfd->gate_bit); in clk_pfdv2_enable() 60 writel_relaxed(val, pfd->reg); in clk_pfdv2_enable() 63 return clk_pfdv2_wait(pfd); in clk_pfdv2_enable() 68 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); in clk_pfdv2_disable() local 73 val = readl_relaxed(pfd in clk_pfdv2_disable() 82 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); clk_pfdv2_recalc_rate() local 144 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); clk_pfdv2_is_enabled() local 155 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); clk_pfdv2_set_rate() local 198 struct clk_pfdv2 *pfd; imx_clk_hw_pfdv2() local [all...] |
/kernel/linux/linux-6.6/drivers/clk/imx/ |
H A D | clk-pfd.c | 38 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_enable() local 40 writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + CLR); in clk_pfd_enable() 47 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_disable() local 49 writel_relaxed(1 << ((pfd->idx + 1) * 8 - 1), pfd->reg + SET); in clk_pfd_disable() 55 struct clk_pfd *pfd = to_clk_pfd(hw); in clk_pfd_recalc_rate() local 57 u8 frac = (readl_relaxed(pfd->reg) >> (pfd->idx * 8)) & 0x3f; in clk_pfd_recalc_rate() 88 struct clk_pfd *pfd in clk_pfd_set_rate() local 108 struct clk_pfd *pfd = to_clk_pfd(hw); clk_pfd_is_enabled() local 128 struct clk_pfd *pfd; imx_clk_hw_pfd() local [all...] |
H A D | clk-pfdv2.c | 43 static int clk_pfdv2_wait(struct clk_pfdv2 *pfd) in clk_pfdv2_wait() argument 47 return readl_poll_timeout(pfd->reg, val, val & (1 << pfd->vld_bit), in clk_pfdv2_wait() 53 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); in clk_pfdv2_enable() local 58 val = readl_relaxed(pfd->reg); in clk_pfdv2_enable() 59 val &= ~(1 << pfd->gate_bit); in clk_pfdv2_enable() 60 writel_relaxed(val, pfd->reg); in clk_pfdv2_enable() 63 return clk_pfdv2_wait(pfd); in clk_pfdv2_enable() 68 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); in clk_pfdv2_disable() local 73 val = readl_relaxed(pfd in clk_pfdv2_disable() 82 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); clk_pfdv2_recalc_rate() local 144 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); clk_pfdv2_is_enabled() local 155 struct clk_pfdv2 *pfd = to_clk_pfdv2(hw); clk_pfdv2_set_rate() local 207 struct clk_pfdv2 *pfd; imx_clk_hw_pfdv2() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/net/af_unix/ |
H A D | test_unix_oob.c | 94 int read_data(int pfd, char *buf, int size) in read_data() argument 99 len = read(pfd, buf, size); in read_data() 107 static void wait_for_data(int pfd, int event) in wait_for_data() argument 111 pfds[0].fd = pfd; in wait_for_data() 177 int lfd, pfd; in main() local 213 pfd = accept(lfd, (struct sockaddr *) &paddr, &len); in main() 214 fcntl(pfd, F_SETOWN, getpid()); in main() 224 wait_for_data(pfd, POLLPRI); in main() 225 read_oob(pfd, &oob); in main() 226 len = read_data(pfd, bu in main() [all...] |
/third_party/nghttp2/src/ |
H A D | shrpx_exec.cc | 42 int pfd[2]; in exec_read_command() local 45 if (pipe2(pfd, O_CLOEXEC) == -1) { in exec_read_command() 49 if (pipe(pfd) == -1) { in exec_read_command() 52 util::make_socket_closeonexec(pfd[0]); in exec_read_command() 53 util::make_socket_closeonexec(pfd[1]); in exec_read_command() 56 auto closer = defer([&pfd]() { in exec_read_command() 57 if (pfd[0] != -1) { in exec_read_command() 58 close(pfd[0]); in exec_read_command() 61 if (pfd[1] != -1) { in exec_read_command() 62 close(pfd[ in exec_read_command() [all...] |
/third_party/mesa3d/src/gallium/frontends/wgl/ |
H A D | stw_pixelformat.c | 158 pfi->pfd.nSize = sizeof pfi->pfd; in stw_pixelformat_add() 159 pfi->pfd.nVersion = 1; in stw_pixelformat_add() 161 pfi->pfd.dwFlags = PFD_SUPPORT_OPENGL; in stw_pixelformat_add() 165 pfi->pfd.dwFlags |= PFD_DRAW_TO_WINDOW; in stw_pixelformat_add() 169 pfi->pfd.dwFlags |= PFD_SUPPORT_COMPOSITION; in stw_pixelformat_add() 172 pfi->pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SWAP_EXCHANGE; in stw_pixelformat_add() 175 pfi->pfd.dwFlags |= PFD_SUPPORT_GDI; in stw_pixelformat_add() 177 pfi->pfd.iPixelType = PFD_TYPE_RGBA; in stw_pixelformat_add() 179 pfi->pfd in stw_pixelformat_add() [all...] |
H A D | stw_ext_pixelformat.c | 71 *pvalue = pfi->pfd.dwFlags & PFD_DRAW_TO_WINDOW ? TRUE : FALSE; in stw_query_attrib() 75 *pvalue = pfi->pfd.dwFlags & PFD_DRAW_TO_BITMAP ? TRUE : FALSE; in stw_query_attrib() 79 *pvalue = pfi->pfd.dwFlags & PFD_NEED_PALETTE ? TRUE : FALSE; in stw_query_attrib() 83 *pvalue = pfi->pfd.dwFlags & PFD_NEED_SYSTEM_PALETTE ? TRUE : FALSE; in stw_query_attrib() 87 if (pfi->pfd.dwFlags & PFD_SWAP_COPY) in stw_query_attrib() 89 else if (pfi->pfd.dwFlags & PFD_SWAP_EXCHANGE) in stw_query_attrib() 144 *pvalue = pfi->pfd.dwFlags & PFD_SUPPORT_GDI ? TRUE : FALSE; in stw_query_attrib() 148 *pvalue = pfi->pfd.dwFlags & PFD_SUPPORT_OPENGL ? TRUE : FALSE; in stw_query_attrib() 152 *pvalue = pfi->pfd.dwFlags & PFD_DOUBLEBUFFER ? TRUE : FALSE; in stw_query_attrib() 156 *pvalue = pfi->pfd in stw_query_attrib() [all...] |
/third_party/alsa-utils/axfer/ |
H A D | waiter-select.c | 45 struct pollfd *pfd; in select_wait_event() local 57 pfd = &waiter->pfds[i]; in select_wait_event() 59 if (pfd->events & POLLIN_SET) in select_wait_event() 60 FD_SET(pfd->fd, &state->rfds_rd); in select_wait_event() 61 if (pfd->events & POLLOUT_SET) in select_wait_event() 62 FD_SET(pfd->fd, &state->rfds_wr); in select_wait_event() 63 if (pfd->events & POLLEX_SET) in select_wait_event() 64 FD_SET(pfd->fd, &state->rfds_ex); in select_wait_event() 65 if (pfd->fd > fd_max) in select_wait_event() 66 fd_max = pfd in select_wait_event() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | perf_branches.c | 106 int pfd; in test_perf_branches_hw() local 116 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_perf_branches_hw() 122 if (pfd == -1) { in test_perf_branches_hw() 129 if (CHECK(pfd < 0, "perf_event_open", "err %d errno %d\n", in test_perf_branches_hw() 130 pfd, errno)) in test_perf_branches_hw() 134 test_perf_branches_common(pfd, check_good_sample); in test_perf_branches_hw() 136 close(pfd); in test_perf_branches_hw() 147 int pfd; in test_perf_branches_no_hw() local 155 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_perf_branches_no_hw() 156 if (CHECK(pfd < in test_perf_branches_no_hw() [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | perf_branches.c | 106 int pfd; in test_perf_branches_hw() local 116 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_perf_branches_hw() 122 if (pfd < 0) { in test_perf_branches_hw() 129 if (CHECK(pfd < 0, "perf_event_open", "err %d errno %d\n", in test_perf_branches_hw() 130 pfd, errno)) in test_perf_branches_hw() 134 test_perf_branches_common(pfd, check_good_sample); in test_perf_branches_hw() 136 close(pfd); in test_perf_branches_hw() 147 int pfd; in test_perf_branches_no_hw() local 155 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in test_perf_branches_no_hw() 156 if (CHECK(pfd < in test_perf_branches_no_hw() [all...] |
H A D | find_vma.c | 28 int pfd; in open_pe() local 36 pfd = syscall(__NR_perf_event_open, &attr, 0, -1, -1, PERF_FLAG_FD_CLOEXEC); in open_pe() 38 return pfd >= 0 ? pfd : -errno; in open_pe() 53 int pfd, i; in test_find_vma_pe() local 56 pfd = open_pe(); in test_find_vma_pe() 57 if (pfd < 0) { in test_find_vma_pe() 58 if (pfd == -ENOENT || pfd == -EOPNOTSUPP) { in test_find_vma_pe() 63 if (!ASSERT_GE(pfd, in test_find_vma_pe() [all...] |
/third_party/pulseaudio/src/pulsecore/ |
H A D | poll-win32.c | 351 pa_poll (struct pollfd *pfd, nfds_t nfd, int timeout) in pa_poll() argument 384 if (!pfd && nfd) in pa_poll() 419 if (pfd[i].fd < 0) in pa_poll() 422 if (pfd[i].events & (POLLIN | POLLRDNORM)) in pa_poll() 423 FD_SET (pfd[i].fd, &rfds); in pa_poll() 428 if (pfd[i].events & (POLLOUT | POLLWRNORM | POLLWRBAND)) in pa_poll() 429 FD_SET (pfd[i].fd, &wfds); in pa_poll() 430 if (pfd[i].events & (POLLPRI | POLLRDBAND)) in pa_poll() 431 FD_SET (pfd[i].fd, &efds); in pa_poll() 432 if (pfd[ in pa_poll() [all...] |
/third_party/glfw/src/ |
H A D | wgl_context.c | 218 PIXELFORMATDESCRIPTOR pfd; in choosePixelFormatWGL() local 223 &pfd)) in choosePixelFormatWGL() 232 if (!(pfd.dwFlags & PFD_DRAW_TO_WINDOW) || in choosePixelFormatWGL() 233 !(pfd.dwFlags & PFD_SUPPORT_OPENGL)) in choosePixelFormatWGL() 238 if (!(pfd.dwFlags & PFD_GENERIC_ACCELERATED) && in choosePixelFormatWGL() 239 (pfd.dwFlags & PFD_GENERIC_FORMAT)) in choosePixelFormatWGL() 244 if (pfd.iPixelType != PFD_TYPE_RGBA) in choosePixelFormatWGL() 247 if (!!(pfd.dwFlags & PFD_DOUBLEBUFFER) != fbconfig->doublebuffer) in choosePixelFormatWGL() 250 u->redBits = pfd.cRedBits; in choosePixelFormatWGL() 251 u->greenBits = pfd in choosePixelFormatWGL() 408 PIXELFORMATDESCRIPTOR pfd; _glfwInitWGL() local 547 PIXELFORMATDESCRIPTOR pfd; _glfwCreateContextWGL() local [all...] |
/third_party/musl/src/network/ |
H A D | res_msend.c | 20 struct pollfd *pfd = p; in cleanup() local 21 for (int i=0; pfd[i].fd >= -1; i++) in cleanup() 22 if (pfd[i].fd >= 0) __syscall(SYS_close, pfd[i].fd); in cleanup() 34 static int start_tcp(struct pollfd *pfd, int family, const void *sa, in start_tcp() argument 59 pfd->fd = fd; in start_tcp() 60 pfd->events = POLLOUT; in start_tcp() 64 if (r == ql+2) pfd->events = POLLIN; in start_tcp() 71 pfd->fd = -1; in start_tcp() 116 struct pollfd pfd[nquerie in res_msend_rc_ext() local [all...] |
/third_party/musl/libc-test/src/functionalext/supplement/network/ |
H A D | nameservercheck_client.c | 51 struct pollfd *pfd = p; in cleanup() local 52 for (int i=0; pfd[i].fd >= -1; i++) in cleanup() 53 if (pfd[i].fd >= 0) close(pfd[i].fd); in cleanup() 65 static int start_tcp(struct pollfd *pfd, int family, const void *sa, in start_tcp() argument 78 pfd->fd = fd; in start_tcp() 79 pfd->events = POLLOUT; in start_tcp() 83 if (r == ql+2) pfd->events = POLLIN; in start_tcp() 90 pfd->fd = -1; in start_tcp() 124 struct pollfd pfd[nquerie in res_msend_rc_ext() local [all...] |
/third_party/curl/lib/ |
H A D | select.c | 194 struct pollfd pfd[3]; in Curl_socket_check() local 211 pfd[num].fd = readfd0; in Curl_socket_check() 212 pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI; in Curl_socket_check() 213 pfd[num].revents = 0; in Curl_socket_check() 217 pfd[num].fd = readfd1; in Curl_socket_check() 218 pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI; in Curl_socket_check() 219 pfd[num].revents = 0; in Curl_socket_check() 223 pfd[num].fd = writefd; in Curl_socket_check() 224 pfd[num].events = POLLWRNORM|POLLOUT|POLLPRI; in Curl_socket_check() 225 pfd[nu in Curl_socket_check() [all...] |
H A D | socketpair.c | 71 struct pollfd pfd[1]; in Curl_socketpair() local 119 pfd[0].fd = listener; in Curl_socketpair() 120 pfd[0].events = POLLIN; in Curl_socketpair() 121 pfd[0].revents = 0; in Curl_socketpair() 122 (void)Curl_poll(pfd, 1, 1000); /* one second */ in Curl_socketpair() 142 pfd[0].fd = socks[1]; in Curl_socketpair() 143 pfd[0].events = POLLIN; in Curl_socketpair() 144 pfd[0].revents = 0; in Curl_socketpair() 145 (void)Curl_poll(pfd, 1, 1000); /* one second */ in Curl_socketpair()
|
/third_party/toybox/toys/other/ |
H A D | watch.c | 71 struct pollfd pfd[2]; in watch_main() local 86 memset(pfd, 0, sizeof(pfd)); in watch_main() 87 pfd[0].events = pfd[1].events = POLLIN; in watch_main() 130 pfd[1].fd = fds[1]; in watch_main() 136 xpoll(pfd, 1+(active && yy<height), then-now); in watch_main() 137 if (pfd[0].revents&POLLIN) { in watch_main() 144 if (pfd[0].revents&POLLHUP) xexit(); in watch_main() 146 if (pfd[ in watch_main() [all...] |
/third_party/libwebsockets/minimal-examples/http-server/minimal-http-server-eventlib-custom/ |
H A D | minimal-http-server.c | 59 struct lws_pollfd *pfd; in custom_poll_add_fd() local 63 pfd = custom_poll_find_fd(cpcx, fd); in custom_poll_add_fd() 64 if (pfd) { in custom_poll_add_fd() 74 pfd = &cpcx->pollfds[cpcx->count_pollfds++]; in custom_poll_add_fd() 75 pfd->fd = fd; in custom_poll_add_fd() 76 pfd->events = (short)events; in custom_poll_add_fd() 77 pfd->revents = 0; in custom_poll_add_fd() 85 struct lws_pollfd *pfd; in custom_poll_del_fd() local 89 pfd = custom_poll_find_fd(cpcx, fd); in custom_poll_del_fd() 90 if (!pfd) { in custom_poll_del_fd() 107 struct lws_pollfd *pfd; custom_poll_change_fd() local [all...] |
/kernel/liteos_a/testsuites/unittest/libc/io/full/ |
H A D | IO_test_ppoll_003.cpp | 42 static struct pollfd pfd;
variable 65 retVal = ppoll(&pfd, 1, NULL, &sigMask);
in pthread_01() 70 if (pfd.revents & POLLIN) {
in pthread_01() 72 retVal = read(pfd.fd, buf, BUF_SIZE);
in pthread_01() 80 ICUNIT_ASSERT_NOT_EQUAL_NULL(pfd.revents & POLLIN, 0, pfd.revents & POLLIN);
in pthread_01() 105 /* 设置pfd sigmask */
in testcase() 106 pfd.fd = pipeFdPpoll[0];
in testcase() 107 pfd.events = POLLIN;
in testcase() 108 pfd in testcase() [all...] |
/kernel/linux/linux-5.10/tools/testing/selftests/nsfs/ |
H A D | owner.c | 28 int pfd[2], ns, uns, init_uns; in main() local 34 if (pipe(pfd)) in main() 44 close(pfd[0]); in main() 45 close(pfd[1]); in main() 50 close(pfd[1]); in main() 51 if (read(pfd[0], &c, 1) != 0) in main() 53 close(pfd[0]); in main()
|
/kernel/linux/linux-6.6/tools/testing/selftests/nsfs/ |
H A D | owner.c | 28 int pfd[2], ns, uns, init_uns; in main() local 34 if (pipe(pfd)) in main() 44 close(pfd[0]); in main() 45 close(pfd[1]); in main() 50 close(pfd[1]); in main() 51 if (read(pfd[0], &c, 1) != 0) in main() 53 close(pfd[0]); in main()
|
/kernel/linux/linux-5.10/tools/testing/selftests/filesystems/epoll/ |
H A D | epoll_wakeup_test.c | 48 struct pollfd pfd; in waiter_entry1ap() local 52 pfd.fd = ctx->efd[0]; in waiter_entry1ap() 53 pfd.events = POLLIN; in waiter_entry1ap() 54 if (poll(&pfd, 1, -1) > 0) { in waiter_entry1ap() 75 struct pollfd pfd; in waiter_entry1op() local 79 pfd.fd = ctx->efd[0]; in waiter_entry1op() 80 pfd.events = POLLIN; in waiter_entry1op() 81 if (poll(&pfd, 1, -1) > 0) { in waiter_entry1op() 102 struct pollfd pfd; in waiter_entry2ap() local 106 pfd in waiter_entry2ap() 290 struct pollfd pfd; TEST() local 329 struct pollfd pfd; TEST() local 369 struct pollfd pfd; TEST() local 415 struct pollfd pfd; TEST() local 991 struct pollfd pfd; TEST() local 1039 struct pollfd pfd; TEST() local 1087 struct pollfd pfd; TEST() local 1135 struct pollfd pfd; TEST() local 1802 struct pollfd pfd; TEST() local 1859 struct pollfd pfd; TEST() local 1916 struct pollfd pfd; TEST() local 1973 struct pollfd pfd; TEST() local 2238 struct pollfd pfd; TEST() local 2347 struct pollfd pfd; TEST() local 2565 struct pollfd pfd; TEST() local 2627 struct pollfd pfd; TEST() local 2948 struct pollfd pfd; TEST() local 3018 struct pollfd pfd; TEST() local 3106 struct pollfd pfd; TEST() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/filesystems/epoll/ |
H A D | epoll_wakeup_test.c | 63 struct pollfd pfd; in waiter_entry1ap() local 67 pfd.fd = ctx->efd[0]; in waiter_entry1ap() 68 pfd.events = POLLIN; in waiter_entry1ap() 69 if (poll(&pfd, 1, -1) > 0) { in waiter_entry1ap() 90 struct pollfd pfd; in waiter_entry1op() local 94 pfd.fd = ctx->efd[0]; in waiter_entry1op() 95 pfd.events = POLLIN; in waiter_entry1op() 96 if (poll(&pfd, 1, -1) > 0) { in waiter_entry1op() 117 struct pollfd pfd; in waiter_entry2ap() local 121 pfd in waiter_entry2ap() 305 struct pollfd pfd; TEST() local 344 struct pollfd pfd; TEST() local 384 struct pollfd pfd; TEST() local 430 struct pollfd pfd; TEST() local 1006 struct pollfd pfd; TEST() local 1054 struct pollfd pfd; TEST() local 1102 struct pollfd pfd; TEST() local 1150 struct pollfd pfd; TEST() local 1817 struct pollfd pfd; TEST() local 1874 struct pollfd pfd; TEST() local 1931 struct pollfd pfd; TEST() local 1988 struct pollfd pfd; TEST() local 2253 struct pollfd pfd; TEST() local 2362 struct pollfd pfd; TEST() local 2580 struct pollfd pfd; TEST() local 2642 struct pollfd pfd; TEST() local 2963 struct pollfd pfd; TEST() local 3033 struct pollfd pfd; TEST() local 3121 struct pollfd pfd; TEST() local [all...] |