Home
last modified time | relevance | path

Searched refs:pfd (Results 1 – 25 of 107) sorted by relevance

12345

/external/robolectric-shadows/robolectric/src/test/java/org/robolectric/shadows/
DShadowParcelFileDescriptorTest.java39 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/state_trackers/wgl/
Dstw_pixelformat.c149 pfi->pfd.nSize = sizeof pfi->pfd; in stw_pixelformat_add()
150 pfi->pfd.nVersion = 1; in stw_pixelformat_add()
152 pfi->pfd.dwFlags = PFD_SUPPORT_OPENGL; in stw_pixelformat_add()
156 pfi->pfd.dwFlags |= PFD_DRAW_TO_WINDOW; in stw_pixelformat_add()
160 pfi->pfd.dwFlags |= PFD_SUPPORT_COMPOSITION; in stw_pixelformat_add()
163 pfi->pfd.dwFlags |= PFD_DOUBLEBUFFER | PFD_SWAP_EXCHANGE; in stw_pixelformat_add()
165 pfi->pfd.iPixelType = PFD_TYPE_RGBA; in stw_pixelformat_add()
167 pfi->pfd.cColorBits = in stw_pixelformat_add()
169 pfi->pfd.cRedBits = color->bits.red; in stw_pixelformat_add()
170 pfi->pfd.cRedShift = color->shift.red; in stw_pixelformat_add()
[all …]
Dstw_ext_pixelformat.c71 *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/openssh/regress/
Dnetcat.c668 struct pollfd pfd; in timeout_connect() local
680 pfd.fd = s; in timeout_connect()
681 pfd.events = POLLOUT; in timeout_connect()
682 if ((ret = poll(&pfd, 1, timeout)) == 1) { in timeout_connect()
770 struct pollfd pfd[4]; in readwrite() local
785 pfd[POLL_STDIN].fd = stdin_fd; in readwrite()
786 pfd[POLL_STDIN].events = POLLIN; in readwrite()
789 pfd[POLL_NETOUT].fd = net_fd; in readwrite()
790 pfd[POLL_NETOUT].events = 0; in readwrite()
793 pfd[POLL_NETIN].fd = net_fd; in readwrite()
[all …]
/external/strace/tests-mx32/
Dpoll.c46 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/
Dpoll.c46 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/
Dpoll.c46 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/libevent/
Dpoll.c116 struct pollfd *pfd = &pop->event_set[i]; in poll_check_ok() local
117 EVUTIL_ASSERT(pop->idxplus1_by_fd[pfd->fd] == i+1); in poll_check_ok()
220 struct pollfd *pfd = NULL; in poll_add() local
254 pfd = &pop->event_set[i]; in poll_add()
257 pfd = &pop->event_set[i]; in poll_add()
258 pfd->events = 0; in poll_add()
259 pfd->fd = fd; in poll_add()
263 pfd->revents = 0; in poll_add()
265 pfd->events |= POLLOUT; in poll_add()
267 pfd->events |= POLLIN; in poll_add()
[all …]
/external/ltp/testcases/kernel/syscalls/clone/
Dclone03.c51 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()
Dclone06.c41 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/toybox/toys/other/
Dwatch.c71 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/curl/lib/
Dselect.c151 struct pollfd pfd[3]; in Curl_socket_check() local
193 pfd[num].fd = readfd0; in Curl_socket_check()
194 pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI; in Curl_socket_check()
195 pfd[num].revents = 0; in Curl_socket_check()
199 pfd[num].fd = readfd1; in Curl_socket_check()
200 pfd[num].events = POLLRDNORM|POLLIN|POLLRDBAND|POLLPRI; in Curl_socket_check()
201 pfd[num].revents = 0; in Curl_socket_check()
205 pfd[num].fd = writefd; in Curl_socket_check()
206 pfd[num].events = POLLWRNORM|POLLOUT; in Curl_socket_check()
207 pfd[num].revents = 0; in Curl_socket_check()
[all …]
Dasyn-ares.c284 struct pollfd pfd[ARES_GETSOCK_MAXNUM]; in waitperform() local
292 pfd[i].events = 0; in waitperform()
293 pfd[i].revents = 0; in waitperform()
295 pfd[i].fd = socks[i]; in waitperform()
296 pfd[i].events |= POLLRDNORM|POLLIN; in waitperform()
299 pfd[i].fd = socks[i]; in waitperform()
300 pfd[i].events |= POLLWRNORM|POLLOUT; in waitperform()
302 if(pfd[i].events != 0) in waitperform()
309 nfds = Curl_poll(pfd, num, timeout_ms); in waitperform()
322 pfd[i].revents & (POLLRDNORM|POLLIN)? in waitperform()
[all …]
/external/ltp/testcases/kernel/syscalls/writev/
Dwritev01.c58 int *pfd; member
66 .pfd = &valid_fd,
74 .pfd = &invalid_fd,
82 .pfd = &valid_fd,
90 .pfd = &valid_fd,
97 .pfd = &valid_fd,
104 .pfd = &(pipe_fd[1]),
131 TEST(writev(*(tcase->pfd), *(tcase->piovec), tcase->iovcnt)); in test_writev()
/external/linux-kselftest/tools/testing/selftests/nsfs/
Downer.c28 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/openssh/
Datomicio.c58 struct pollfd pfd; in atomicio6() local
61 pfd.fd = fd; in atomicio6()
62 pfd.events = f == read ? POLLIN : POLLOUT; in atomicio6()
72 (void)poll(&pfd, 1, -1); in atomicio6()
108 struct pollfd pfd; in atomiciov6() local
118 pfd.fd = fd; in atomiciov6()
119 pfd.events = f == readv ? POLLIN : POLLOUT; in atomiciov6()
129 (void)poll(&pfd, 1, -1); in atomiciov6()
Dmonitor_fdpass.c66 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/adhd/cras/src/tests/
Dcras_router.c130 int *pfd = malloc(sizeof(*pfd)); in run_file_io_stream() local
131 *pfd = fd; in run_file_io_stream()
147 pfd, in run_file_io_stream()
189 free(pfd); in run_file_io_stream()
256 int pfd[2]; in main() local
258 rc = pipe(pfd); in main()
263 run_file_io_stream(client, pfd[1], pfd[0], CRAS_STREAM_INPUT, in main()
/external/linux-kselftest/tools/testing/selftests/net/
Dpsock_tpacket.c239 struct pollfd pfd; in walk_v1_v2_rx() local
248 memset(&pfd, 0, sizeof(pfd)); in walk_v1_v2_rx()
249 pfd.fd = sock; in walk_v1_v2_rx()
250 pfd.events = POLLIN | POLLERR; in walk_v1_v2_rx()
251 pfd.revents = 0; in walk_v1_v2_rx()
282 poll(&pfd, 1, 1); in walk_v1_v2_rx()
389 struct pollfd pfd; in walk_tx() local
428 memset(&pfd, 0, sizeof(pfd)); in walk_tx()
429 pfd.fd = sock; in walk_tx()
430 pfd.events = POLLOUT | POLLERR; in walk_tx()
[all …]
Dudpgso_bench_rx.c57 struct pollfd pfd; in do_poll() local
60 pfd.events = POLLIN; in do_poll()
61 pfd.revents = 0; in do_poll()
62 pfd.fd = fd; in do_poll()
65 ret = poll(&pfd, 1, 10); in do_poll()
70 if (pfd.revents != POLLIN) in do_poll()
72 pfd.revents, POLLIN); in do_poll()
/external/libcups/cups/
Dsidechannel.c112 struct pollfd pfd; /* Poll structure for poll() */ in cupsSideChannelRead() local
135 pfd.fd = CUPS_SC_FD; in cupsSideChannelRead()
136 pfd.events = POLLIN; in cupsSideChannelRead()
138 while ((nfds = poll(&pfd, 1, in cupsSideChannelRead()
535 struct pollfd pfd; /* Poll structure for poll() */ in cupsSideChannelWrite() local
555 pfd.fd = CUPS_SC_FD; in cupsSideChannelWrite()
556 pfd.events = POLLOUT; in cupsSideChannelWrite()
560 if (poll(&pfd, 1, -1) < 1) in cupsSideChannelWrite()
563 else if (poll(&pfd, 1, (int)(timeout * 1000)) < 1) in cupsSideChannelWrite()
/external/bcc/src/cc/
Dlibbpf.c772 int *pfd) in bpf_attach_tracing_event() argument
780 if (*pfd < 0) { in bpf_attach_tracing_event()
808 *pfd = syscall(__NR_perf_event_open, &attr, pid, cpu, -1 /* group_fd */, PERF_FLAG_FD_CLOEXEC); in bpf_attach_tracing_event()
809 if (*pfd < 0) { in bpf_attach_tracing_event()
815 if (ioctl(*pfd, PERF_EVENT_IOC_SET_BPF, progfd) < 0) { in bpf_attach_tracing_event()
819 if (ioctl(*pfd, PERF_EVENT_IOC_ENABLE, 0) < 0) { in bpf_attach_tracing_event()
830 int kfd, pfd = -1; in bpf_attach_kprobe() local
836 pfd = bpf_try_perf_event_open_with_probe(fn_name, fn_offset, -1, event_type, in bpf_attach_kprobe()
840 if (pfd < 0) { in bpf_attach_kprobe()
873 if (bpf_attach_tracing_event(progfd, buf, -1 /* PID */, &pfd) == 0) in bpf_attach_kprobe()
[all …]
/external/wpa_supplicant_8/src/utils/
Deloop.c450 struct pollfd *pfd; in eloop_sock_table_set_fds() local
475 pfd = pollfds_map[fd]; in eloop_sock_table_set_fds()
476 if (!pfd) { in eloop_sock_table_set_fds()
477 pfd = &(pollfds[nxt]); in eloop_sock_table_set_fds()
478 pfd->events = 0; in eloop_sock_table_set_fds()
479 pfd->fd = fd; in eloop_sock_table_set_fds()
481 pollfds_map[fd] = pfd; in eloop_sock_table_set_fds()
484 pfd->events |= POLLOUT; in eloop_sock_table_set_fds()
501 pfd = pollfds_map[fd]; in eloop_sock_table_set_fds()
502 if (!pfd) { in eloop_sock_table_set_fds()
[all …]
/external/ltp/testcases/open_posix_testsuite/conformance/interfaces/sched_yield/
D1-1.c66 int pfd[2]; in main() local
73 rc = pipe(pfd); in main()
96 child_busy(pfd[1]); in main()
104 rc = read(pfd[0], buf, sizeof(buf)); in main()
/external/google-breakpad/src/client/linux/minidump_writer/
Dminidump_writer_unittest.cc374 struct pollfd pfd; in TEST() local
375 memset(&pfd, 0, sizeof(pfd)); in TEST()
376 pfd.fd = fds[0]; in TEST()
377 pfd.events = POLLIN | POLLERR; in TEST()
379 const int r = HANDLE_EINTR(poll(&pfd, 1, 1000)); in TEST()
381 ASSERT_TRUE(pfd.revents & POLLIN); in TEST()
618 struct pollfd pfd; in TEST() local
619 memset(&pfd, 0, sizeof(pfd)); in TEST()
620 pfd.fd = fds[0]; in TEST()
621 pfd.events = POLLIN | POLLERR; in TEST()
[all …]

12345