/third_party/ltp/testcases/kernel/syscalls/writev/ |
H A D | writev01.c | 46 int *pfd; member 54 .pfd = &valid_fd, 62 .pfd = &invalid_fd, 70 .pfd = &valid_fd, 78 .pfd = &valid_fd, 85 .pfd = &valid_fd, 92 .pfd = &(pipe_fd[1]), 119 TEST(writev(*(tcase->pfd), *(tcase->piovec), tcase->iovcnt)); in test_writev()
|
/kernel/linux/linux-6.6/tools/testing/selftests/bpf/prog_tests/ |
H A D | perf_link.c | 31 int pfd = -1, link_fd = -1, err; in serial_test_perf_link() local 43 pfd = syscall(__NR_perf_event_open, &attr, -1, 0, -1, PERF_FLAG_FD_CLOEXEC); in serial_test_perf_link() 44 if (!ASSERT_GE(pfd, 0, "perf_fd")) in serial_test_perf_link() 51 link_fd = bpf_link_create(bpf_program__fd(skel->progs.handler), pfd, in serial_test_perf_link() 87 if (pfd >= 0) in serial_test_perf_link() 88 close(pfd); in serial_test_perf_link()
|
H A D | pe_preserve_elems.c | 12 int err, key = 0, pfd = -1, mfd = bpf_map__fd(map); in test_one_map() local 20 pfd = syscall(__NR_perf_event_open, &attr, 0 /* pid */, in test_one_map() 22 if (CHECK(pfd < 0, "perf_event_open", "failed\n")) in test_one_map() 25 err = bpf_map_update_elem(mfd, &key, &pfd, BPF_ANY); in test_one_map() 26 close(pfd); in test_one_map()
|
/kernel/liteos_a/testsuites/unittest/libc/io/full/ |
H A D | IO_test_ppoll_002.cpp | 42 static struct pollfd pfd; variable 55 retVal = ppoll(&pfd, 1, &timeout, NULL); in pthread_01() 59 if (pfd.revents & POLLIN) { in pthread_01() 61 retVal = read(pfd.fd, buf, BUF_SIZE); in pthread_01() 86 /* 设置pfd */ in testcase() 87 pfd.fd = pipeFdPpoll[0]; in testcase() 88 pfd.events = POLLIN; in testcase()
|
H A D | IO_test_ppoll_001.cpp | 41 static struct pollfd pfd; variable 53 retVal = ppoll(&pfd, 1, NULL, NULL); in pthread_01() 62 if (pfd.revents & POLLIN) { in pthread_01() 64 retVal = read(pfd.fd, buf, BUF_SIZE); in pthread_01() 90 /* 设置pfd */ in testcase() 91 pfd.fd = pipeFdPpoll[0]; in testcase() 92 pfd.events = POLLIN; in testcase()
|
/kernel/linux/linux-5.10/tools/testing/selftests/bpf/prog_tests/ |
H A D | pe_preserve_elems.c | 12 int err, key = 0, pfd = -1, mfd = bpf_map__fd(map); in test_one_map() local 20 pfd = syscall(__NR_perf_event_open, &attr, 0 /* pid */, in test_one_map() 22 if (CHECK(pfd < 0, "perf_event_open", "failed\n")) in test_one_map() 25 err = bpf_map_update_elem(mfd, &key, &pfd, BPF_ANY); in test_one_map() 26 close(pfd); in test_one_map()
|
/third_party/musl/Benchmark/musl/ |
H A D | libc_poll.cpp | 8 struct pollfd pfd; in Bm_function_Poll() local 15 pfd.fd = fd; in Bm_function_Poll() 16 pfd.events = POLLIN; in Bm_function_Poll() 19 benchmark::DoNotOptimize(poll(&pfd, 1, 0)); in Bm_function_Poll()
|
/third_party/libwebsockets/lib/core-net/client/ |
H A D | connect4.c | 35 struct lws_pollfd pfd; in lws_client_connect_4_established() local 277 pfd.fd = wsi->desc.sockfd; in lws_client_connect_4_established() 278 pfd.events = LWS_POLLIN; in lws_client_connect_4_established() 279 pfd.revents = LWS_POLLOUT; in lws_client_connect_4_established() 282 n = lws_service_fd(wsi->a.context, &pfd); in lws_client_connect_4_established() 317 pfd.fd = wsi->desc.sockfd; in lws_client_connect_4_established() 318 pfd.events = LWS_POLLIN; in lws_client_connect_4_established() 319 pfd.revents = LWS_POLLIN; in lws_client_connect_4_established() 321 n = lws_service_fd(wsi->a.context, &pfd); in lws_client_connect_4_established()
|
/third_party/libwebsockets/test-apps/ |
H A D | test-server.c | 90 struct lws_pollfd *pfd; in lws_callback_http() local 100 pfd = ext_find_fd(pa->fd); in lws_callback_http() 101 if (pfd) { in lws_callback_http() 105 pfd = ext_find_fd(LWS_SOCK_INVALID); in lws_callback_http() 106 if (!pfd) in lws_callback_http() 109 pfd->fd = pa->fd; in lws_callback_http() 110 pfd->events = (short)pa->events; in lws_callback_http() 111 pfd->revents = 0; in lws_callback_http() 113 count_pollfds = (int)((pfd - pollfds) + 1); in lws_callback_http() 118 pfd in lws_callback_http() [all...] |
/kernel/linux/linux-5.10/tools/gpio/ |
H A D | gpio-watch.c | 27 struct pollfd pfd; in main() local 55 pfd.fd = fd; in main() 56 pfd.events = POLLIN | POLLPRI; in main() 59 ret = poll(&pfd, 1, 5000); in main() 65 rd = read(pfd.fd, &chg, sizeof(chg)); in main()
|
/kernel/linux/linux-6.6/tools/gpio/ |
H A D | gpio-watch.c | 27 struct pollfd pfd; in main() local 55 pfd.fd = fd; in main() 56 pfd.events = POLLIN | POLLPRI; in main() 59 ret = poll(&pfd, 1, 5000); in main() 65 rd = read(pfd.fd, &chg, sizeof(chg)); in main()
|
/third_party/backends/tools/ |
H A D | mustek600iin-off.c | 101 int pfd; in main() local 152 else if ((pfd = open (PORT_DEV, O_RDWR, 0666)) >= 0) in main() 157 if ((lseek (pfd, portaddr, SEEK_SET) != portaddr) in main() 158 || (write (pfd, offcmd, 1) != 1)) in main() 163 close (pfd); in main()
|
/third_party/eudev/src/udev/ |
H A D | udevadm-settle.c | 62 struct pollfd pfd[1] = { {.fd = -1}, }; in adm_settle() local 132 pfd[0].events = POLLIN; in adm_settle() 133 pfd[0].fd = udev_queue_get_fd(queue); in adm_settle() 134 if (pfd[0].fd < 0) { in adm_settle() 156 if (poll(pfd, 1, MSEC_PER_SEC) > 0 && pfd[0].revents & POLLIN) in adm_settle()
|
/third_party/libwebsockets/lib/plat/windows/ |
H A D | windows-service.c | 64 struct lws_pollfd *pfd; in _lws_plat_service_tsi() local 99 pfd = &pt->fds[i]; in _lws_plat_service_tsi() 101 if (!(pfd->events & LWS_POLLOUT)) in _lws_plat_service_tsi() 104 wsi = wsi_from_fd(context, pfd->fd); in _lws_plat_service_tsi() 109 pfd->revents = LWS_POLLOUT; in _lws_plat_service_tsi() 110 n = lws_service_fd(context, pfd); in _lws_plat_service_tsi()
|
/third_party/rust/crates/nix/test/ |
H A D | test_poll.rs | 74 let pfd = PollFd::new(0x1234, PollFlags::empty()); in test_pollfd_fd() 75 assert_eq!(pfd.as_raw_fd(), 0x1234); in test_pollfd_fd() 80 let mut pfd = PollFd::new(-1, PollFlags::POLLIN); in test_pollfd_events() variables 81 assert_eq!(pfd.events(), PollFlags::POLLIN); in test_pollfd_events() 82 pfd.set_events(PollFlags::POLLOUT); in test_pollfd_events() 83 assert_eq!(pfd.events(), PollFlags::POLLOUT); in test_pollfd_events()
|
/kernel/linux/linux-5.10/arch/mips/alchemy/devboards/ |
H A D | platform.c | 155 struct physmap_flash_data *pfd; in db1x_register_norflash() local 173 pfd = kzalloc(sizeof(struct physmap_flash_data), GFP_KERNEL); in db1x_register_norflash() 174 if (!pfd) in db1x_register_norflash() 227 pfd->width = width; in db1x_register_norflash() 228 pfd->parts = parts; in db1x_register_norflash() 229 pfd->nr_parts = 5; in db1x_register_norflash() 231 pd->dev.platform_data = pfd; in db1x_register_norflash() 241 kfree(pfd); in db1x_register_norflash()
|
/kernel/linux/linux-6.6/arch/mips/alchemy/devboards/ |
H A D | platform.c | 155 struct physmap_flash_data *pfd; in db1x_register_norflash() local 173 pfd = kzalloc(sizeof(struct physmap_flash_data), GFP_KERNEL); in db1x_register_norflash() 174 if (!pfd) in db1x_register_norflash() 227 pfd->width = width; in db1x_register_norflash() 228 pfd->parts = parts; in db1x_register_norflash() 229 pfd->nr_parts = 5; in db1x_register_norflash() 231 pd->dev.platform_data = pfd; in db1x_register_norflash() 241 kfree(pfd); in db1x_register_norflash()
|
/kernel/linux/linux-5.10/tools/testing/selftests/net/ |
H A D | psock_tpacket.c | 222 struct pollfd pfd; in walk_v1_v2_rx() local 231 memset(&pfd, 0, sizeof(pfd)); in walk_v1_v2_rx() 232 pfd.fd = sock; in walk_v1_v2_rx() 233 pfd.events = POLLIN | POLLERR; in walk_v1_v2_rx() 234 pfd.revents = 0; in walk_v1_v2_rx() 265 poll(&pfd, 1, 1); in walk_v1_v2_rx() 371 struct pollfd pfd; in walk_tx() local 410 memset(&pfd, 0, sizeof(pfd)); in walk_tx() 584 struct pollfd pfd; walk_v3_rx() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/net/ |
H A D | psock_tpacket.c | 222 struct pollfd pfd; in walk_v1_v2_rx() local 231 memset(&pfd, 0, sizeof(pfd)); in walk_v1_v2_rx() 232 pfd.fd = sock; in walk_v1_v2_rx() 233 pfd.events = POLLIN | POLLERR; in walk_v1_v2_rx() 234 pfd.revents = 0; in walk_v1_v2_rx() 265 poll(&pfd, 1, 1); in walk_v1_v2_rx() 371 struct pollfd pfd; in walk_tx() local 410 memset(&pfd, 0, sizeof(pfd)); in walk_tx() 584 struct pollfd pfd; walk_v3_rx() local [all...] |
/third_party/ltp/testcases/kernel/syscalls/timerfd/ |
H A D | timerfd01.c | 70 struct pollfd pfd; in waittmr() local 72 pfd.fd = tfd; in waittmr() 73 pfd.events = POLLIN; in waittmr() 74 pfd.revents = 0; in waittmr() 75 if (poll(&pfd, 1, -1) < 0) { in waittmr() 79 if ((pfd.revents & POLLIN) == 0) { in waittmr()
|
/kernel/linux/linux-6.6/tools/testing/selftests/sched/ |
H A D | cs_prctl_test.c | 68 int pfd[2]; member 157 close(ca->pfd[0]); in child_func_process() 161 ret = write(ca->pfd[1], &ca->thr_tids, sizeof(int) * ca->num_threads); in child_func_process() 163 printf("write failed on pfd[%d] - error (%s)\n", in child_func_process() 164 ca->pfd[1], strerror(errno)); in child_func_process() 166 close(ca->pfd[1]); in child_func_process() 183 if (pipe(proc[i].pfd) == -1) in create_processes() 189 close(proc[i].pfd[1]); in create_processes() 193 ret = read(proc[i].pfd[0], &proc[i].thr_tids, sizeof(int) * proc[i].num_threads); in create_processes() 195 printf("read failed on proc[%d].pfd[ in create_processes() [all...] |
/third_party/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/ |
H A D | 1-1.c | 69 int pfd[2]; in main() local 76 rc = pipe(pfd); in main() 99 child_busy(pfd[1]); in main() 107 rc = read(pfd[0], buf, sizeof(buf)); in main()
|
/kernel/linux/linux-6.6/drivers/clk/ |
H A D | clk-versaclock3.c | 244 const struct vc3_pfd_data *pfd = vc3->data; in vc3_pfd_recalc_rate() local 249 regmap_read(vc3->regmap, pfd->offs, &prediv); in vc3_pfd_recalc_rate() 250 if (pfd->num == VC3_PFD1) { in vc3_pfd_recalc_rate() 252 if (prediv & pfd->mdiv1_bitmsk) { in vc3_pfd_recalc_rate() 260 } else if (pfd->num == VC3_PFD2) { in vc3_pfd_recalc_rate() 262 if (prediv & pfd->mdiv1_bitmsk) { in vc3_pfd_recalc_rate() 273 if (prediv & pfd->mdiv1_bitmsk) in vc3_pfd_recalc_rate() 279 if (prediv & pfd->mdiv2_bitmsk) in vc3_pfd_recalc_rate() 291 const struct vc3_pfd_data *pfd = vc3->data; in vc3_pfd_round_rate() local 303 if (pfd in vc3_pfd_round_rate() 318 const struct vc3_pfd_data *pfd = vc3->data; vc3_pfd_set_rate() local [all...] |
/kernel/linux/linux-6.6/tools/testing/selftests/pidfd/ |
H A D | pidfd_wait.c | 98 int pfd[2]; in TEST() local 104 ASSERT_EQ(pipe(pfd), 0); in TEST() 111 close(pfd[1]); in TEST() 113 ASSERT_EQ(read(pfd[0], buf, 1), 1); in TEST() 114 close(pfd[0]); in TEST() 119 close(pfd[0]); in TEST() 128 ASSERT_EQ(write(pfd[1], "C", 1), 1); in TEST() 129 close(pfd[1]); in TEST()
|
/third_party/mesa3d/src/egl/drivers/wgl/ |
H A D | egl_wgl.c | 67 double_buffer = (stw_config->pfd.dwFlags & PFD_DOUBLEBUFFER) != 0; in wgl_add_config() 69 if (stw_config->pfd.iPixelType != PFD_TYPE_RGBA) in wgl_add_config() 72 base.RedSize = stw_config->pfd.cRedBits; in wgl_add_config() 73 base.GreenSize = stw_config->pfd.cGreenBits; in wgl_add_config() 74 base.BlueSize = stw_config->pfd.cBlueBits; in wgl_add_config() 75 base.AlphaSize = stw_config->pfd.cAlphaBits; in wgl_add_config() 76 base.BufferSize = stw_config->pfd.cColorBits; in wgl_add_config() 78 if (stw_config->pfd.cAccumBits) { in wgl_add_config() 86 base.DepthSize = stw_config->pfd.cDepthBits; in wgl_add_config() 87 base.StencilSize = stw_config->pfd in wgl_add_config() [all...] |