/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/ |
D | ShadowParcelFileDescriptorTest.java | 39 ParcelFileDescriptor pfd = in testOpens() local 41 assertThat(pfd).isNotNull(); in testOpens() 42 assertThat(pfd.getFileDescriptor().valid()).isTrue(); in testOpens() 43 pfd.close(); in testOpens() 48 ParcelFileDescriptor pfd = in testOpens_canReadReadOnlyFile() local 50 assertThat(pfd).isNotNull(); in testOpens_canReadReadOnlyFile() 51 assertThat(pfd.getFileDescriptor().valid()).isTrue(); in testOpens_canReadReadOnlyFile() 52 FileInputStream is = new FileInputStream(pfd.getFileDescriptor()); in testOpens_canReadReadOnlyFile() 54 pfd.close(); in testOpens_canReadReadOnlyFile() 59 ParcelFileDescriptor pfd = in testOpens_canWriteWritableFile() local [all …]
|
/external/mesa3d/src/gallium/frontends/wgl/ |
D | stw_pixelformat.c | 150 pfi->pfd.nSize = sizeof pfi->pfd; in stw_pixelformat_add() 151 pfi->pfd.nVersion = 1; in stw_pixelformat_add() 153 pfi->pfd.dwFlags = PFD_SUPPORT_OPENGL; in stw_pixelformat_add() 157 pfi->pfd.dwFlags |= PFD_DRAW_TO_WINDOW; in stw_pixelformat_add() 161 pfi->pfd.dwFlags |= PFD_SUPPORT_COMPOSITION; in stw_pixelformat_add() 164 pfi->pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SWAP_EXCHANGE; in stw_pixelformat_add() 166 pfi->pfd.iPixelType = PFD_TYPE_RGBA; in stw_pixelformat_add() 168 pfi->pfd.cColorBits = in stw_pixelformat_add() 170 pfi->pfd.cRedBits = color->bits.red; in stw_pixelformat_add() 171 pfi->pfd.cRedShift = color->shift.red; in stw_pixelformat_add() [all …]
|
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.dwFlags & PFD_STEREO ? TRUE : FALSE; in stw_query_attrib() [all …]
|
/external/igt-gpu-tools/tests/ |
D | prime_busy.c | 30 static bool prime_busy(struct pollfd *pfd, bool excl) in prime_busy() argument 32 pfd->events = excl ? POLLOUT : POLLIN; in prime_busy() 33 return poll(pfd, 1, 0) == 0; in prime_busy() 45 struct pollfd pfd[2]; in busy() local 73 memset(pfd, 0, sizeof(pfd)); in busy() 74 pfd[SCRATCH].fd = prime_handle_to_fd(fd, obj[SCRATCH].handle); in busy() 75 pfd[BATCH].fd = prime_handle_to_fd(fd, obj[BATCH].handle); in busy() 135 memset(pfd, 0, sizeof(pfd)); in busy() 136 pfd[SCRATCH].fd = prime_handle_to_fd(fd, obj[SCRATCH].handle); in busy() 137 pfd[BATCH].fd = prime_handle_to_fd(fd, obj[BATCH].handle); in busy() [all …]
|
D | vgem_slow.c | 51 struct pollfd pfd; in test_nohang() local 63 pfd.fd = prime_handle_to_fd(fd, bo.handle); in test_nohang() 64 pfd.events = POLLOUT; in test_nohang() 68 igt_assert(poll(&pfd, 1, 0) == 0); in test_nohang() 69 igt_assert(poll(&pfd, 1, 60*1000) == 1); in test_nohang() 72 close(pfd.fd); in test_nohang()
|
/external/openssh/regress/ |
D | netcat.c | 671 struct pollfd pfd; in timeout_connect() local 683 pfd.fd = s; in timeout_connect() 684 pfd.events = POLLOUT; in timeout_connect() 685 if ((ret = poll(&pfd, 1, timeout)) == 1) { in timeout_connect() 778 struct pollfd pfd[4]; in readwrite() local 793 pfd[POLL_STDIN].fd = stdin_fd; in readwrite() 794 pfd[POLL_STDIN].events = POLLIN; in readwrite() 797 pfd[POLL_NETOUT].fd = net_fd; in readwrite() 798 pfd[POLL_NETOUT].events = 0; in readwrite() 801 pfd[POLL_NETIN].fd = net_fd; in readwrite() [all …]
|
/external/libwebsockets/lib/plat/windows/ |
D | windows-service.c | 63 struct lws_pollfd *pfd; in _lws_plat_service_tsi() local 101 pfd = &pt->fds[i]; in _lws_plat_service_tsi() 103 if (!(pfd->events & LWS_POLLOUT)) in _lws_plat_service_tsi() 106 wsi = wsi_from_fd(context, pfd->fd); in _lws_plat_service_tsi() 111 pfd->revents = LWS_POLLOUT; in _lws_plat_service_tsi() 112 n = lws_service_fd(context, pfd); in _lws_plat_service_tsi() 188 pfd = &pt->fds[eIdx]; in _lws_plat_service_tsi() 189 pfd->revents = (short)networkevents.lNetworkEvents; in _lws_plat_service_tsi() 198 pfd->revents |= LWS_POLLHUP; in _lws_plat_service_tsi() 201 if (pfd->revents & LWS_POLLOUT) { in _lws_plat_service_tsi() [all …]
|
/external/libevent/ |
D | poll.c | 127 struct pollfd *pfd = &pop->event_set[i]; in poll_check_ok() local 128 EVUTIL_ASSERT(pop->idxplus1_by_fd[pfd->fd] == i+1); in poll_check_ok() 233 struct pollfd *pfd = NULL; in poll_add() local 267 pfd = &pop->event_set[i]; in poll_add() 270 pfd = &pop->event_set[i]; in poll_add() 271 pfd->events = 0; in poll_add() 272 pfd->fd = fd; in poll_add() 276 pfd->revents = 0; in poll_add() 278 pfd->events |= POLLOUT; in poll_add() 280 pfd->events |= POLLIN; in poll_add() [all …]
|
/external/libiio/src/iiod/ |
D | ops.c | 70 struct pollfd pfd[3]; in thd_entry_event_wait() local 76 pfd[0].fd = thd->eventfd; in thd_entry_event_wait() 77 pfd[0].events = POLLIN; in thd_entry_event_wait() 78 pfd[1].fd = fd_in; in thd_entry_event_wait() 79 pfd[1].events = POLLRDHUP; in thd_entry_event_wait() 80 pfd[2].fd = thread_pool_get_poll_fd(thd->pdata->pool); in thd_entry_event_wait() 81 pfd[2].events = POLLIN; in thd_entry_event_wait() 84 poll_nointr(pfd, 3); in thd_entry_event_wait() 86 if ((pfd[1].revents & POLLRDHUP) || (pfd[2].revents & POLLIN)) { in thd_entry_event_wait() 139 struct pollfd pfd[2]; in async_io() local [all …]
|
/external/strace/tests-mx32/ |
D | poll.c | 46 if (member != pfd->member) \ 54 print_pollfd_entering(const struct pollfd *const pfd) in print_pollfd_entering() argument 56 tprintf("{fd=%d", pfd->fd); in print_pollfd_entering() 57 if (pfd->fd >= 0) { in print_pollfd_entering() 59 short events = pfd->events; in print_pollfd_entering() 61 if (pfd->events) { in print_pollfd_entering() 87 print_pollfd_array_entering(const struct pollfd *const pfd, in print_pollfd_array_entering() argument 98 tprintf("... /* %p */", &pfd[i]); in print_pollfd_array_entering() 105 print_pollfd_entering(&pfd[i]); in print_pollfd_array_entering() 111 print_pollfd_exiting(const struct pollfd *const pfd, in print_pollfd_exiting() argument [all …]
|
/external/strace/tests/ |
D | poll.c | 46 if (member != pfd->member) \ 54 print_pollfd_entering(const struct pollfd *const pfd) in print_pollfd_entering() argument 56 tprintf("{fd=%d", pfd->fd); in print_pollfd_entering() 57 if (pfd->fd >= 0) { in print_pollfd_entering() 59 short events = pfd->events; in print_pollfd_entering() 61 if (pfd->events) { in print_pollfd_entering() 87 print_pollfd_array_entering(const struct pollfd *const pfd, in print_pollfd_array_entering() argument 98 tprintf("... /* %p */", &pfd[i]); in print_pollfd_array_entering() 105 print_pollfd_entering(&pfd[i]); in print_pollfd_array_entering() 111 print_pollfd_exiting(const struct pollfd *const pfd, in print_pollfd_exiting() argument [all …]
|
/external/strace/tests-m32/ |
D | poll.c | 46 if (member != pfd->member) \ 54 print_pollfd_entering(const struct pollfd *const pfd) in print_pollfd_entering() argument 56 tprintf("{fd=%d", pfd->fd); in print_pollfd_entering() 57 if (pfd->fd >= 0) { in print_pollfd_entering() 59 short events = pfd->events; in print_pollfd_entering() 61 if (pfd->events) { in print_pollfd_entering() 87 print_pollfd_array_entering(const struct pollfd *const pfd, in print_pollfd_array_entering() argument 98 tprintf("... /* %p */", &pfd[i]); in print_pollfd_array_entering() 105 print_pollfd_entering(&pfd[i]); in print_pollfd_array_entering() 111 print_pollfd_exiting(const struct pollfd *const pfd, in print_pollfd_exiting() argument [all …]
|
/external/ltp/testcases/kernel/syscalls/clone/ |
D | clone03.c | 51 static int pfd[2]; variable 76 if ((pipe(pfd)) == -1) in main() 86 if ((close(pfd[1])) == -1) in main() 91 if ((read(pfd[0], buff, sizeof(buff))) == -1) in main() 96 if ((close(pfd[0])) == -1) in main() 133 if ((close(pfd[0])) == -1) in child_fn() 139 if ((write(pfd[1], pid, sizeof(pid))) == -1) in child_fn() 143 if ((close(pfd[1])) == -1) in child_fn()
|
D | clone06.c | 41 static int pfd[2]; variable 65 if ((pipe(pfd)) == -1) in main() 75 if ((close(pfd[1])) == -1) in main() 79 if ((read(pfd[0], buff, sizeof(buff))) == -1) in main() 84 if ((close(pfd[0])) == -1) in main() 126 if ((close(pfd[0])) == -1) in child_environ() 132 if ((write(pfd[1], var, MAX_LINE_LENGTH)) == -1) in child_environ() 136 if ((close(pfd[1])) == -1) in child_environ()
|
/external/openssh/ |
D | atomicio.c | 58 struct pollfd pfd; in atomicio6() local 60 pfd.fd = fd; in atomicio6() 62 pfd.events = f == read ? POLLIN : POLLOUT; in atomicio6() 64 pfd.events = POLLIN|POLLOUT; in atomicio6() 78 (void)poll(&pfd, 1, -1); in atomicio6() 113 struct pollfd pfd; in atomiciov6() local 122 pfd.fd = fd; in atomiciov6() 124 pfd.events = f == readv ? POLLIN : POLLOUT; in atomiciov6() 126 pfd.events = POLLIN|POLLOUT; in atomiciov6() 140 (void)poll(&pfd, 1, -1); in atomiciov6()
|
D | monitor_fdpass.c | 66 struct pollfd pfd; in mm_send_fd() local 88 pfd.fd = sock; in mm_send_fd() 89 pfd.events = POLLOUT; in mm_send_fd() 93 (void)poll(&pfd, 1, -1); in mm_send_fd() 128 struct pollfd pfd; in mm_receive_fd() local 144 pfd.fd = sock; in mm_receive_fd() 145 pfd.events = POLLIN; in mm_receive_fd() 149 (void)poll(&pfd, 1, -1); in mm_receive_fd()
|
/external/curl/lib/ |
D | select.c | 248 struct pollfd pfd[3]; in Curl_socket_check() local 265 pfd[num].fd = readfd0; in Curl_socket_check() 266 pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI; in Curl_socket_check() 267 pfd[num].revents = 0; in Curl_socket_check() 271 pfd[num].fd = readfd1; in Curl_socket_check() 272 pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI; in Curl_socket_check() 273 pfd[num].revents = 0; in Curl_socket_check() 277 pfd[num].fd = writefd; in Curl_socket_check() 278 pfd[num].events = POLLWRNORM|POLLOUT|POLLPRI; in Curl_socket_check() 279 pfd[num].revents = 0; in Curl_socket_check() [all …]
|
/external/toybox/toys/other/ |
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[1].revents&POLLIN) len = read(fds[1], toybuf, sizeof(toybuf)-1); in watch_main() 147 if (pfd[1].revents&POLLHUP) active = 0; in watch_main()
|
/external/ltp/testcases/kernel/syscalls/writev/ |
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()
|
/external/linux-kselftest/tools/testing/selftests/nsfs/ |
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()
|
/external/linux-kselftest/tools/testing/selftests/filesystems/epoll/ |
D | epoll_wakeup_test.c | 46 struct pollfd pfd; in waiter_entry1ap() local 50 pfd.fd = ctx->efd[0]; in waiter_entry1ap() 51 pfd.events = POLLIN; in waiter_entry1ap() 52 if (poll(&pfd, 1, -1) > 0) { in waiter_entry1ap() 73 struct pollfd pfd; in waiter_entry1op() local 77 pfd.fd = ctx->efd[0]; in waiter_entry1op() 78 pfd.events = POLLIN; in waiter_entry1op() 79 if (poll(&pfd, 1, -1) > 0) { in waiter_entry1op() 100 struct pollfd pfd; in waiter_entry2ap() local 104 pfd.fd = ctx->efd[0]; in waiter_entry2ap() [all …]
|
/external/fastrpc/src/ |
D | adsp_default_listener.c | 49 struct pollfd pfd; in adsp_default_listener_start() local 74 (remote_handle*)&pfd.fd))); in adsp_default_listener_start() 77 pfd.events = POLLIN; in adsp_default_listener_start() 78 pfd.revents = 0; in adsp_default_listener_start() 87 VERIFYC(0 < poll(&pfd, 1, -1), AEE_EPOLL); in adsp_default_listener_start() 88 VERIFYC(0 == eventfd_read(pfd.fd, &event), AEE_EEVENTREAD); in adsp_default_listener_start()
|
/external/libcups/scheduler/ |
D | select.c | 444 struct pollfd *pfd; /* Current pollfd structure */ in cupsdDoSelect() local 515 pfd = realloc(cupsd_pollfds, (size_t)allocfds * sizeof(struct pollfd)); in cupsdDoSelect() 517 pfd = malloc((size_t)allocfds * sizeof(struct pollfd)); in cupsdDoSelect() 519 if (!pfd) in cupsdDoSelect() 526 cupsd_pollfds = pfd; in cupsdDoSelect() 534 for (fdptr = (_cupsd_fd_t *)cupsArrayFirst(cupsd_fds), pfd = cupsd_pollfds; in cupsdDoSelect() 536 fdptr = (_cupsd_fd_t *)cupsArrayNext(cupsd_fds), pfd ++) in cupsdDoSelect() 538 pfd->fd = fdptr->fd; in cupsdDoSelect() 539 pfd->events = 0; in cupsdDoSelect() 542 pfd->events |= POLLIN; in cupsdDoSelect() [all …]
|
/external/adhd/cras/src/tools/cras_router/ |
D | cras_router.c | 115 int *pfd = malloc(sizeof(*pfd)); in run_file_io_stream() local 116 *pfd = fd; in run_file_io_stream() 129 pfd, got_samples, in run_file_io_stream() 164 free(pfd); in run_file_io_stream() 228 int pfd[2]; in main() local 230 rc = pipe(pfd); in main() 235 run_file_io_stream(client, pfd[1], pfd[0], CRAS_STREAM_INPUT, in main()
|
/external/linux-kselftest/tools/testing/selftests/net/ |
D | psock_tpacket.c | 225 struct pollfd pfd; in walk_v1_v2_rx() local 234 memset(&pfd, 0, sizeof(pfd)); in walk_v1_v2_rx() 235 pfd.fd = sock; in walk_v1_v2_rx() 236 pfd.events = POLLIN | POLLERR; in walk_v1_v2_rx() 237 pfd.revents = 0; in walk_v1_v2_rx() 268 poll(&pfd, 1, 1); in walk_v1_v2_rx() 375 struct pollfd pfd; in walk_tx() local 414 memset(&pfd, 0, sizeof(pfd)); in walk_tx() 415 pfd.fd = sock; in walk_tx() 416 pfd.events = POLLOUT | POLLERR; in walk_tx() [all …]
|