/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...] |
/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...] |
/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()
|
/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/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/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...] |
/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()
|
/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/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()
|
/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()
|
/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...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/utils/ |
H A D | eloop.c | 527 struct pollfd *pfd; in eloop_sock_table_set_fds() local 552 pfd = pollfds_map[fd]; in eloop_sock_table_set_fds() 553 if (!pfd) { in eloop_sock_table_set_fds() 554 pfd = &(pollfds[nxt]); in eloop_sock_table_set_fds() 555 pfd->events = 0; in eloop_sock_table_set_fds() 556 pfd->fd = fd; in eloop_sock_table_set_fds() 558 pollfds_map[fd] = pfd; in eloop_sock_table_set_fds() 561 pfd->events |= POLLOUT; in eloop_sock_table_set_fds() 578 pfd = pollfds_map[fd]; in eloop_sock_table_set_fds() 579 if (!pfd) { in eloop_sock_table_set_fds() 600 struct pollfd *pfd; eloop_sock_table_dispatch_table() local 1415 struct pollfd pfd; eloop_wait_for_read_sock() local [all...] |
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/utils/ |
H A D | eloop.c | 530 struct pollfd *pfd; in eloop_sock_table_set_fds() local 555 pfd = pollfds_map[fd]; in eloop_sock_table_set_fds() 556 if (!pfd) { in eloop_sock_table_set_fds() 557 pfd = &(pollfds[nxt]); in eloop_sock_table_set_fds() 558 pfd->events = 0; in eloop_sock_table_set_fds() 559 pfd->fd = fd; in eloop_sock_table_set_fds() 561 pollfds_map[fd] = pfd; in eloop_sock_table_set_fds() 564 pfd->events |= POLLOUT; in eloop_sock_table_set_fds() 581 pfd = pollfds_map[fd]; in eloop_sock_table_set_fds() 582 if (!pfd) { in eloop_sock_table_set_fds() 603 struct pollfd *pfd; eloop_sock_table_dispatch_table() local 1441 struct pollfd pfd; eloop_wait_for_read_sock() local [all...] |