| /freebsd-13.1/tools/regression/poll/ |
| H A D | pipepoll.c | 92 struct pollfd pfd; in child() local 101 pfd.fd = fd; in child() 102 pfd.events = POLLIN; in child() 105 if ((res = poll(&pfd, 1, 0)) < 0) in child() 123 if ((res = poll(&pfd, 1, 0)) < 0) in child() 131 if ((res = poll(&pfd, 1, 0)) < 0) in child() 136 if ((res = poll(&pfd, 1, 0)) < 0) in child() 144 if ((res = poll(&pfd, 1, 0)) < 0) in child() 159 if ((res = poll(&pfd, 1, 0)) < 0) in child() 201 pfd.fd = fd2; in child() [all …]
|
| /freebsd-13.1/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() 436 width = pfd->pfd_dynwidth ? pfd->pfd_dynwidth : pfd->pfd_width; in pfprint_stack() 736 for (pfd = _dtrace_conversions; pfd->pfc_name != NULL; pfd++) { in dt_pfdict_create() 882 nfd = pfd; in dt_printf_create() 1043 for (pfd = pfv->pfv_argv; pfd != NULL; pfd = nfd) { in dt_printf_destroy() 1045 free(pfd); in dt_printf_destroy() 1385 for (i = 0; i < pfv->pfv_argc; i++, pfd = pfd->pfd_next) { in dt_printf_format() 1403 bcopy(pfd->pfd_prefix, tmp, pfd->pfd_preflen); in dt_printf_format() 1864 for (i = 0; i < pfv->pfv_argc; i++, pfd = pfd->pfd_next) { in dtrace_printf_create() [all …]
|
| /freebsd-13.1/contrib/netcat/ |
| H A D | netcat.c | 721 struct pollfd pfd; in timeout_connect() local 733 pfd.fd = s; in timeout_connect() 734 pfd.events = POLLOUT; in timeout_connect() 827 struct pollfd pfd[4]; in readwrite() local 860 if (pfd[POLL_STDIN].fd == -1 && pfd[POLL_NETIN].fd == -1 in readwrite() 868 if (pfd[POLL_NETOUT].fd == -1 && pfd[POLL_STDOUT].fd == -1) { in readwrite() 908 pfd[n].fd = -1; in readwrite() 1074 struct pollfd pfd; in fdpass() local 1097 bzero(&pfd, sizeof(pfd)); in fdpass() 1098 pfd.fd = STDOUT_FILENO; in fdpass() [all …]
|
| /freebsd-13.1/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-13.1/tests/sys/file/ |
| H A D | flock_helper.c | 188 int pfd[2]; in test2() local 259 int pfd[2]; in test3() local 329 int pfd[2]; in test4() local 603 int pfd[2]; in test7() local 675 int pfd[2]; in test8() local 752 int pfd[2]; in test9() local 824 int pfd[2]; in test10() local 977 int pfd[2]; in test12() local 1055 int pfd[2]; in test13() local 1342 int pfd[2]; in test15() local [all …]
|
| /freebsd-13.1/contrib/apr/support/unix/ |
| H A D | waitio.c | 43 struct pollfd pfd; in apr_wait_for_io_or_timeout() local 48 pfd.events = for_read ? POLLIN : POLLOUT; in apr_wait_for_io_or_timeout() 51 rc = poll(&pfd, 1, timeout); in apr_wait_for_io_or_timeout() 70 apr_pollfd_t pfd; in apr_wait_for_io_or_timeout() local 77 pfd.desc_type = APR_POLL_FILE; in apr_wait_for_io_or_timeout() 78 pfd.desc.f = f; in apr_wait_for_io_or_timeout() 91 pfd.desc_type = APR_POLL_SOCKET; in apr_wait_for_io_or_timeout() 92 pfd.desc.s = s; in apr_wait_for_io_or_timeout() 97 pfd.reqevents = type; in apr_wait_for_io_or_timeout() 103 (void) apr_pollset_remove(pollset, &pfd); in apr_wait_for_io_or_timeout() [all …]
|
| /freebsd-13.1/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-13.1/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-13.1/tools/regression/netinet/tcpfullwindowrst/ |
| H A D | tcpfullwindowrsttest.c | 67 struct pollfd pfd[2]; in main() local 101 pfd[0].fd = t; in main() 102 pfd[0].events = POLLOUT; in main() 103 pfd[1].fd = u; in main() 104 pfd[1].events = POLLOUT; in main() 106 if (poll(pfd, 2, 1000) == 0) { in main() 109 pfd[0].fd = -1; in main() 114 if (pfd[0].revents & POLLOUT) { in main() 117 pfd[0].fd = -1; in main() 121 if (pfd[1].revents & POLLOUT) { in main() [all …]
|
| /freebsd-13.1/usr.bin/diff/ |
| H A D | pr.c | 49 int pfd[2]; in start_pr() local 61 if (pipe(pfd) == -1) in start_pr() 70 if (pfd[0] != STDIN_FILENO) { in start_pr() 71 dup2(pfd[0], STDIN_FILENO); in start_pr() 72 close(pfd[0]); in start_pr() 74 close(pfd[1]); in start_pr() 80 if (pfd[1] != STDOUT_FILENO) { in start_pr() 82 dup2(pfd[1], STDOUT_FILENO); in start_pr() 83 close(pfd[1]); in start_pr() 84 close(pfd[1]); in start_pr() [all …]
|
| /freebsd-13.1/contrib/apr/poll/unix/ |
| H A D | wakeup.c | 30 apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd, in apr_poll_create_wakeup_pipe() argument 39 pfd->reqevents = APR_POLLIN; in apr_poll_create_wakeup_pipe() 40 pfd->desc_type = APR_POLL_FILE; in apr_poll_create_wakeup_pipe() 41 pfd->desc.f = wakeup_pipe[0]; in apr_poll_create_wakeup_pipe() 64 apr_status_t apr_poll_create_wakeup_pipe(apr_pollfd_t *pfd, apr_file_t **wakeup_pipe) in apr_poll_create_wakeup_pipe() argument 78 apr_status_t apr_poll_create_wakeup_pipe(apr_pool_t *pool, apr_pollfd_t *pfd, in apr_poll_create_wakeup_pipe() argument 87 pfd->p = pool; in apr_poll_create_wakeup_pipe() 88 pfd->reqevents = APR_POLLIN; in apr_poll_create_wakeup_pipe() 89 pfd->desc_type = APR_POLL_FILE; in apr_poll_create_wakeup_pipe() 90 pfd->desc.f = wakeup_pipe[0]; in apr_poll_create_wakeup_pipe()
|
| /freebsd-13.1/contrib/ntp/sntp/libevent/ |
| H A D | poll.c | 220 struct pollfd *pfd = NULL; in poll_add() local 254 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() 295 pfd = &pop->event_set[i]; in poll_del() 297 pfd->events &= ~POLLIN; in poll_del() 299 pfd->events &= ~POLLOUT; in poll_del() [all …]
|
| /freebsd-13.1/contrib/libevent/ |
| H A D | poll.c | 220 struct pollfd *pfd = NULL; in poll_add() local 254 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() 295 pfd = &pop->event_set[i]; in poll_del() 297 pfd->events &= ~POLLIN; in poll_del() 299 pfd->events &= ~POLLOUT; in poll_del() [all …]
|
| /freebsd-13.1/crypto/openssh/ |
| H A 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()
|
| 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-13.1/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-13.1/lib/libc/gen/ |
| H A D | recvmmsg.c | 44 struct pollfd pfd[1]; in recvmmsg() local 51 pfd[0].fd = s; in recvmmsg() 52 pfd[0].revents = 0; in recvmmsg() 53 pfd[0].events = ev = POLLIN | POLLRDNORM | POLLRDBAND | in recvmmsg() 55 res = ppoll(&pfd[0], 1, timeout, NULL); in recvmmsg() 58 if (pfd[0].revents & POLLNVAL) { in recvmmsg() 62 if ((pfd[0].revents & ev) == 0) { in recvmmsg()
|
| /freebsd-13.1/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-13.1/contrib/blacklist/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-13.1/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-13.1/tools/regression/capsicum/syscalls/ |
| H A D | cap_getmode.c | 51 int pfd; in main() local 89 pid = pdfork(&pfd, 0); in main() 102 if (pdwait(pfd) == -1) in main() 104 close(pfd); in main() 148 pid = pdfork(&pfd, 0); in main() 161 if (pdwait(pfd) == -1) in main() 163 close(pfd); in main()
|
| /freebsd-13.1/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-13.1/contrib/libfido2/src/ |
| H A D | hid_unix.c | 53 struct pollfd pfd; in fido_hid_unix_wait() local 56 memset(&pfd, 0, sizeof(pfd)); in fido_hid_unix_wait() 57 pfd.events = POLLIN; in fido_hid_unix_wait() 58 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-13.1/tools/tools/ncpus/ |
| H A D | biosmptable.c | 128 static int pfd = -1; variable 133 if (pfd < 0) { in memopen() 134 pfd = open(_PATH_MEM, O_RDONLY); in memopen() 135 if (pfd < 0) in memopen() 138 return pfd >= 0; in memopen() 144 if (pfd >= 0) { in memclose() 145 close(pfd); in memclose() 146 pfd = -1; in memclose() 153 if ((size_t)pread(pfd, entry, size, addr) != size) { in memread()
|
| /freebsd-13.1/usr.sbin/daemon/ |
| H A D | daemon.c | 274 if (pipe(pfd)) in main() 293 close(pfd[1]); in main() 294 pfd[1] = -1; in main() 308 close(pfd[0]); in main() 319 if (pfd[1] != STDERR_FILENO && in main() 320 pfd[1] != STDOUT_FILENO) in main() 321 close(pfd[1]); in main() 388 close(pfd[0]); in main() 389 pfd[0] = -1; in main() 394 close(pfd[0]); in main() [all …]
|