/freebsd/tools/regression/poll/ |
H A D | pipepoll.c | 91 struct pollfd pfd; in child() local 100 pfd.fd = fd; in child() 101 pfd.events = POLLIN; in child() 104 if ((res = poll(&pfd, 1, 0)) < 0) in child() 122 if ((res = poll(&pfd, 1, 0)) < 0) in child() 130 if ((res = poll(&pfd, 1, 0)) < 0) in child() 135 if ((res = poll(&pfd, 1, 0)) < 0) in child() 143 if ((res = poll(&pfd, 1, 0)) < 0) in child() 158 if ((res = poll(&pfd, 1, 0)) < 0) in child() 200 pfd.fd = fd2; in child() [all …]
|
/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/ |
H A D | dt_printf.c | 172 pfd->pfd_fmt[strlen(pfd->pfd_fmt) - 1] = 'i'; in pfcheck_dint() 174 pfd->pfd_fmt[strlen(pfd->pfd_fmt) - 1] = 'u'; in pfcheck_dint() 435 width = pfd->pfd_dynwidth ? pfd->pfd_dynwidth : pfd->pfd_width; in pfprint_stack() 735 for (pfd = _dtrace_conversions; pfd->pfc_name != NULL; pfd++) { in dt_pfdict_create() 881 nfd = pfd; in dt_printf_create() 1042 for (pfd = pfv->pfv_argv; pfd != NULL; pfd = nfd) { in dt_printf_destroy() 1044 free(pfd); in dt_printf_destroy() 1384 for (i = 0; i < pfv->pfv_argc; i++, pfd = pfd->pfd_next) { in dt_printf_format() 1402 bcopy(pfd->pfd_prefix, tmp, pfd->pfd_preflen); in dt_printf_format() 1863 for (i = 0; i < pfv->pfv_argc; i++, pfd = pfd->pfd_next) { in dtrace_printf_create() [all …]
|
/freebsd/contrib/netbsd-tests/kernel/ |
H A D | msg.h | 33 int pfd[2]; member 47 if (pipe(fds->pfd) == -1) in msg_open() 50 close(fds->pfd[0]); in msg_open() 51 close(fds->pfd[1]); in msg_open() 60 CLOSEFD(fds->pfd[0]); in msg_close() 61 CLOSEFD(fds->pfd[1]); in msg_close() 71 CLOSEFD(fds->pfd[0]); in msg_write_child() 88 CLOSEFD(fds->pfd[1]); in msg_write_parent() 96 rv = read(fds->pfd[0], msg, len); in msg_write_parent() 106 CLOSEFD(fds->pfd[1]); in msg_read_parent() [all …]
|
/freebsd/contrib/netcat/ |
H A D | netcat.c | 742 struct pollfd pfd; in timeout_connect() local 754 pfd.fd = s; in timeout_connect() 755 pfd.events = POLLOUT; in timeout_connect() 848 struct pollfd pfd[4]; in readwrite() local 881 if (pfd[POLL_STDIN].fd == -1 && pfd[POLL_NETIN].fd == -1 in readwrite() 889 if (pfd[POLL_NETOUT].fd == -1 && pfd[POLL_STDOUT].fd == -1) { in readwrite() 929 pfd[n].fd = -1; in readwrite() 1119 struct pollfd pfd; in fdpass() local 1142 bzero(&pfd, sizeof(pfd)); in fdpass() 1143 pfd.fd = STDOUT_FILENO; in fdpass() [all …]
|
/freebsd/tests/sys/file/ |
H A D | flock_helper.c | 186 int pfd[2]; in test2() local 257 int pfd[2]; in test3() local 327 int pfd[2]; in test4() local 601 int pfd[2]; in test7() local 673 int pfd[2]; in test8() local 750 int pfd[2]; in test9() local 822 int pfd[2]; in test10() local 975 int pfd[2]; in test12() local 1053 int pfd[2]; in test13() local 1340 int pfd[2]; in test15() local [all …]
|
/freebsd/crypto/openssh/regress/ |
H A D | netcat.c | 677 struct pollfd pfd; in timeout_connect() local 689 pfd.fd = s; in timeout_connect() 690 pfd.events = POLLOUT; in timeout_connect() 784 struct pollfd pfd[4]; in readwrite() local 816 if (pfd[POLL_STDIN].fd == -1 && pfd[POLL_NETIN].fd == -1 in readwrite() 822 if (pfd[POLL_NETOUT].fd == -1 && pfd[POLL_STDOUT].fd == -1) { in readwrite() 855 pfd[n].fd = -1; in readwrite() 1018 struct pollfd pfd; in fdpass() local 1041 bzero(&pfd, sizeof(pfd)); in fdpass() 1042 pfd.fd = STDOUT_FILENO; in fdpass() [all …]
|
/freebsd/contrib/netbsd-tests/lib/libc/sys/ |
H A D | t_poll.c | 49 struct pollfd pfd; in child1() local 51 pfd.fd = desc; in child1() 61 struct pollfd pfd; in child2() local 63 pfd.fd = desc; in child2() 74 struct pollfd pfd; in child3() local 78 pfd.fd = desc; in child3() 223 struct pollfd pfd; in ATF_TC_BODY() local 226 pfd.fd = fd; in ATF_TC_BODY() 318 struct pollfd pfd; in ATF_TC_BODY() local 321 pfd.fd = fd; in ATF_TC_BODY() [all …]
|
/freebsd/tests/sys/netinet/ |
H A D | socket_afinet.c | 97 struct pollfd pfd; in ATF_TC_BODY() local 129 pfd.fd = ss2; in ATF_TC_BODY() 131 rc = poll(&pfd, 1, 0); in ATF_TC_BODY() 144 pfd.fd = ss2; in ATF_TC_BODY() 145 pfd.events = POLLIN; in ATF_TC_BODY() 160 struct pollfd pfd; in ATF_TC_BODY() local 193 pfd.fd = ss2; in ATF_TC_BODY() 195 rc = poll(&pfd, 1, 0); in ATF_TC_BODY() 206 pfd.fd = ss2; in ATF_TC_BODY() 208 rc = poll(&pfd, 1, 0); in ATF_TC_BODY() [all …]
|
/freebsd/tools/regression/netinet/tcpfullwindowrst/ |
H A D | tcpfullwindowrsttest.c | 65 struct pollfd pfd[2]; in main() local 99 pfd[0].fd = t; in main() 100 pfd[0].events = POLLOUT; in main() 101 pfd[1].fd = u; in main() 102 pfd[1].events = POLLOUT; in main() 104 if (poll(pfd, 2, 1000) == 0) { in main() 107 pfd[0].fd = -1; in main() 112 if (pfd[0].revents & POLLOUT) { in main() 115 pfd[0].fd = -1; in main() 119 if (pfd[1].revents & POLLOUT) { in main() [all …]
|
/freebsd/usr.bin/diff/ |
H A D | pr.c | 46 int pfd[2]; in start_pr() local 58 if (pipe(pfd) == -1) in start_pr() 67 if (pfd[0] != STDIN_FILENO) { in start_pr() 68 dup2(pfd[0], STDIN_FILENO); in start_pr() 69 close(pfd[0]); in start_pr() 71 close(pfd[1]); in start_pr() 77 if (pfd[1] != STDOUT_FILENO) { in start_pr() 79 dup2(pfd[1], STDOUT_FILENO); in start_pr() 80 close(pfd[1]); in start_pr() 82 close(pfd[0]); in start_pr()
|
/freebsd/contrib/ntp/sntp/libevent/ |
H A D | poll.c | 233 struct pollfd *pfd = NULL; in poll_add() local 267 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() 310 pfd = &pop->event_set[i]; in poll_del() 312 pfd->events &= ~POLLIN; in poll_del() 314 pfd->events &= ~POLLOUT; in poll_del() [all …]
|
/freebsd/contrib/libevent/ |
H A D | poll.c | 233 struct pollfd *pfd = NULL; in poll_add() local 267 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() 310 pfd = &pop->event_set[i]; in poll_del() 312 pfd->events &= ~POLLIN; in poll_del() 314 pfd->events &= ~POLLOUT; in poll_del() [all …]
|
/freebsd/crypto/openssh/ |
H A D | atomicio.c | 57 struct pollfd pfd; in atomicio6() local 59 pfd.fd = fd; in atomicio6() 61 pfd.events = f == read ? POLLIN : POLLOUT; in atomicio6() 63 pfd.events = POLLIN|POLLOUT; in atomicio6() 77 (void)poll(&pfd, 1, -1); in atomicio6() 112 struct pollfd pfd; in atomiciov6() local 121 pfd.fd = fd; in atomiciov6() 123 pfd.events = f == readv ? POLLIN : POLLOUT; in atomiciov6() 125 pfd.events = POLLIN|POLLOUT; in atomiciov6() 139 (void)poll(&pfd, 1, -1); in atomiciov6()
|
H A 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() 127 struct pollfd pfd; in mm_receive_fd() local 143 pfd.fd = sock; in mm_receive_fd() 144 pfd.events = POLLIN; in mm_receive_fd() 148 (void)poll(&pfd, 1, -1); in mm_receive_fd()
|
/freebsd/contrib/sendmail/libmilter/ |
H A D | worker.c | 355 struct pollfd *pfd = NULL; local 369 if (pfd == NULL) 437 pfd[nfd].fd = RD_PIPE; 439 pfd[nfd].revents = 0; 469 realloc(pfd, new); 472 pfd = tpfd; 489 pfd[nfd].revents = 0; 531 if (pfd[i].revents == 0) 546 pfd[i].events, pfd[i].revents)); 610 if (pfd != NULL) [all …]
|
/freebsd/lib/libsys/ |
H A D | recvmmsg.c | 41 struct pollfd pfd[1]; in recvmmsg() local 48 pfd[0].fd = s; in recvmmsg() 49 pfd[0].revents = 0; in recvmmsg() 50 pfd[0].events = ev = POLLIN | POLLRDNORM | POLLRDBAND | in recvmmsg() 52 res = ppoll(&pfd[0], 1, timeout, NULL); in recvmmsg() 55 if (pfd[0].revents & POLLNVAL) { in recvmmsg() 59 if ((pfd[0].revents & ev) == 0) { in recvmmsg()
|
/freebsd/contrib/bearssl/tools/ |
H A D | sslio.c | 378 HANDLE pfd[2]; in run_ssl_engine() local 381 struct pollfd pfd[3]; in run_ssl_engine() local 513 pfd[u] = h_in; in run_ssl_engine() 549 pfd[u].fd = fd; in run_ssl_engine() 550 pfd[u].revents = 0; in run_ssl_engine() 551 pfd[u].events = 0; in run_ssl_engine() 562 pfd[u].fd = 0; in run_ssl_engine() 563 pfd[u].revents = 0; in run_ssl_engine() 569 pfd[u].fd = 1; in run_ssl_engine() 570 pfd[u].revents = 0; in run_ssl_engine() [all …]
|
/freebsd/contrib/blocklist/test/ |
H A D | srvtest.c | 182 struct pollfd pfd[NUMFD]; in main() local 204 pfd[0].fd = cr(AF_INET, type, port); in main() 205 pfd[0].events = POLLIN; in main() 207 pfd[1].fd = cr(AF_INET6, type, port); in main() 208 pfd[1].events = POLLIN; in main() 212 if (poll(pfd, __arraycount(pfd), INFTIM) == -1) in main() 214 for (size_t i = 0; i < __arraycount(pfd); i++) { in main() 215 if ((pfd[i].revents & POLLIN) == 0) in main() 217 handle(type, pfd[i].fd); in main()
|
/freebsd/contrib/netbsd-tests/lib/librumphijack/ |
H A D | h_client.c | 97 struct pollfd pfd[2]; in main() local 105 pfd[0].fd = STDIN_FILENO; in main() 106 pfd[0].events = POLLIN; in main() 107 pfd[1].fd = fd; in main() 108 pfd[1].events = POLLIN; in main() 110 if ((rv = poll(pfd, 2, INFTIM)) != 1) in main() 113 if (pfd[1].revents != POLLNVAL || pfd[0].revents != 0) in main()
|
/freebsd/tools/regression/capsicum/syscalls/ |
H A D | cap_getmode.c | 48 int pfd; in main() local 86 pid = pdfork(&pfd, 0); in main() 99 if (pdwait(pfd) == -1) in main() 101 close(pfd); in main() 145 pid = pdfork(&pfd, 0); in main() 158 if (pdwait(pfd) == -1) in main() 160 close(pfd); in main()
|
/freebsd/contrib/pf/libevent/ |
H A D | poll.c | 218 struct pollfd *pfd = NULL; in poll_add() local 291 pfd = &pop->event_set[i]; in poll_add() 295 pfd->events = 0; in poll_add() 296 pfd->fd = ev->ev_fd; in poll_add() 301 pfd->revents = 0; in poll_add() 303 pfd->events |= POLLOUT; in poll_add() 307 pfd->events |= POLLIN; in poll_add() 338 pfd = &pop->event_set[i]; in poll_del() 340 pfd->events &= ~POLLIN; in poll_del() 344 pfd->events &= ~POLLOUT; in poll_del() [all …]
|
/freebsd/contrib/libfido2/src/ |
H A D | hid_unix.c | 54 struct pollfd pfd; in fido_hid_unix_wait() local 57 memset(&pfd, 0, sizeof(pfd)); in fido_hid_unix_wait() 58 pfd.events = POLLIN; in fido_hid_unix_wait() 59 pfd.fd = fd; in fido_hid_unix_wait() 69 if ((r = ppoll(&pfd, 1, ms > -1 ? &ts : NULL, sigmask)) < 1) { in fido_hid_unix_wait()
|
/freebsd/tools/tools/ncpus/ |
H A D | biosmptable.c | 125 static int pfd = -1; variable 130 if (pfd < 0) { in memopen() 131 pfd = open(_PATH_MEM, O_RDONLY); in memopen() 132 if (pfd < 0) in memopen() 135 return pfd >= 0; in memopen() 141 if (pfd >= 0) { in memclose() 142 close(pfd); in memclose() 143 pfd = -1; in memclose() 150 if ((size_t)pread(pfd, entry, size, addr) != size) { in memread()
|
/freebsd/usr.bin/talk/ |
H A D | ctl_transact.c | 52 struct pollfd pfd[1]; in ctl_transact() local 58 pfd[0].fd = ctl_sockt; in ctl_transact() 59 pfd[0].events = POLLIN; in ctl_transact() 76 nready = poll(pfd, 1, CTL_WAIT * 1000); in ctl_transact() 95 nready = poll(pfd, 1, 0); in ctl_transact()
|
/freebsd/contrib/netbsd-tests/net/fdpass/ |
H A D | fdpass.c | 58 struct pollfd pfd; in send_fd() local 79 pfd.fd = sock; in send_fd() 80 pfd.events = POLLOUT; in send_fd() 83 (void)poll(&pfd, 1, -1); in send_fd() 111 struct pollfd pfd; in recv_fd() local 125 pfd.fd = sock; in recv_fd() 126 pfd.events = POLLIN; in recv_fd() 129 (void)poll(&pfd, 1, -1); in recv_fd()
|