Home
last modified time | relevance | path

Searched full:pfd (Results 1 – 25 of 144) sorted by relevance

123456

/freebsd/cddl/contrib/opensolaris/lib/libdtrace/common/
H A Ddt_printf.c62 pfcheck_addr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_addr() argument
69 pfcheck_kaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_kaddr() argument
77 pfcheck_uaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_uaddr() argument
93 pfcheck_stack(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_stack() argument
100 pfcheck_time(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_time() argument
108 pfcheck_str(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_str() argument
130 pfcheck_wstr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_wstr() argument
147 pfcheck_csi(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_csi() argument
155 pfcheck_fp(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_fp() argument
162 pfcheck_xint(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_xint() argument
[all …]
/freebsd/tools/regression/poll/
H A Dpipepoll.c91 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()
106 report(num++, "0", 0, pfd.revents, res, 0); in child()
122 if ((res = poll(&pfd, 1, 0)) < 0) in child()
124 report(num++, "1", 0, pfd.revents, res, 0); in child()
130 if ((res = poll(&pfd, 1, 0)) < 0) in child()
132 report(num++, "2", POLLIN, pfd.revents, res, 1); in child()
135 if ((res = poll(&pfd, 1, 0)) < 0) in child()
[all …]
/freebsd/contrib/netcat/
H A Dnetcat.c742 struct pollfd pfd; in timeout_connect() local
754 pfd.fd = s; in timeout_connect()
755 pfd.events = POLLOUT; in timeout_connect()
756 if ((ret = poll(&pfd, 1, timeout)) == 1) { in timeout_connect()
848 struct pollfd pfd[4]; in readwrite() local
864 pfd[POLL_STDIN].fd = (tun_fd != -1) ? tun_fd : stdin_fd; in readwrite()
865 pfd[POLL_STDIN].events = POLLIN; in readwrite()
868 pfd[POLL_NETOUT].fd = net_fd; in readwrite()
869 pfd[POLL_NETOUT].events = 0; in readwrite()
872 pfd[POLL_NETIN].fd = net_fd; in readwrite()
[all …]
/freebsd/tests/sys/netinet/
H A Dsocket_afinet.c97 struct pollfd pfd; in ATF_TC_BODY() local
129 pfd.fd = ss2; in ATF_TC_BODY()
130 pfd.events = POLLIN | POLLOUT; in ATF_TC_BODY()
131 rc = poll(&pfd, 1, 0); in ATF_TC_BODY()
133 ATF_CHECK_EQ(POLLOUT, pfd.revents); in ATF_TC_BODY()
144 pfd.fd = ss2; in ATF_TC_BODY()
145 pfd.events = POLLIN; in ATF_TC_BODY()
146 rc = poll(&pfd, 1, 60000); in ATF_TC_BODY()
148 ATF_CHECK_EQ(POLLIN, pfd.revents); in ATF_TC_BODY()
160 struct pollfd pfd; in ATF_TC_BODY() local
[all …]
/freebsd/contrib/netbsd-tests/kernel/
H A Dmsg.h33 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()
74 rv = write(fds->pfd[1], msg, len); 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()
[all …]
/freebsd/contrib/netbsd-tests/lib/libc/sys/
H A Dt_poll.c49 struct pollfd pfd; in child1() local
51 pfd.fd = desc; in child1()
52 pfd.events = POLLIN | POLLHUP | POLLOUT; in child1()
54 (void)poll(&pfd, 1, 2000); in child1()
61 struct pollfd pfd; in child2() local
63 pfd.fd = desc; in child2()
64 pfd.events = POLLIN | POLLHUP | POLLOUT; in child2()
67 (void)poll(&pfd, 1, INFTIM); in child2()
74 struct pollfd pfd; in child3() local
78 pfd.fd = desc; in child3()
[all …]
/freebsd/tests/sys/file/
H A Dflock_helper.c186 int pfd[2]; in test2() local
191 if (pipe(pfd) < 0) in test2()
211 if (write(pfd[1], "a", 1) < 0) in test2()
221 if (read(pfd[0], &ch, 1) != 1) in test2()
232 close(pfd[0]); in test2()
233 close(pfd[1]); in test2()
257 int pfd[2]; in test3() local
262 if (pipe(pfd) < 0) in test3()
282 if (write(pfd[1], "a", 1) < 0) in test3()
292 if (read(pfd[0], &ch, 1) != 1) in test3()
[all …]
/freebsd/crypto/openssh/regress/
H A Dnetcat.c677 struct pollfd pfd; in timeout_connect() local
689 pfd.fd = s; in timeout_connect()
690 pfd.events = POLLOUT; in timeout_connect()
691 if ((ret = poll(&pfd, 1, timeout)) == 1) { in timeout_connect()
784 struct pollfd pfd[4]; in readwrite() local
799 pfd[POLL_STDIN].fd = stdin_fd; in readwrite()
800 pfd[POLL_STDIN].events = POLLIN; in readwrite()
803 pfd[POLL_NETOUT].fd = net_fd; in readwrite()
804 pfd[POLL_NETOUT].events = 0; in readwrite()
807 pfd[POLL_NETIN].fd = net_fd; in readwrite()
[all …]
/freebsd/tools/regression/netinet/tcpfullwindowrst/
H A Dtcpfullwindowrsttest.c65 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/contrib/ntp/sntp/libevent/
H A Dpoll.c127 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 …]
/freebsd/contrib/libevent/
H A Dpoll.c127 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 …]
/freebsd/usr.bin/diff/
H A Dpr.c46 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/crypto/openssh/
H A Datomicio.c57 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 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()
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 Dworker.c348 #define WAIT_FD(i) (pfd[i].fd)
355 struct pollfd *pfd = NULL; local
368 pfd = (struct pollfd *) malloc(PFD_STEP * sizeof(struct pollfd));
369 if (pfd == NULL)
437 pfd[nfd].fd = RD_PIPE;
438 pfd[nfd].events = MI_POLL_RD_FLAGS;
439 pfd[nfd].revents = 0;
469 realloc(pfd, new);
472 pfd = tpfd;
487 pfd[nfd].fd = ctx->ctx_sd;
[all …]
/freebsd/contrib/pf/libevent/
H A Dpoll.c142 struct pollfd *pfd = &pop->event_set[i]; in poll_check_ok() local
143 assert(pop->idxplus1_by_fd[pfd->fd] == i+1); in poll_check_ok()
218 struct pollfd *pfd = NULL; in poll_add() local
291 pfd = &pop->event_set[i]; in poll_add()
294 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()
[all …]
/freebsd/contrib/bearssl/tools/
H A Dsslio.c378 HANDLE pfd[2]; in run_ssl_engine() local
381 struct pollfd pfd[3]; in run_ssl_engine() local
509 pfd[u] = (HANDLE)fd_event; in run_ssl_engine()
513 pfd[u] = h_in; in run_ssl_engine()
517 wt = WaitForMultipleObjectsEx(u, pfd, 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()
553 pfd[u].events |= POLLOUT; in run_ssl_engine()
556 pfd[u].events |= POLLIN; in run_ssl_engine()
[all …]
/freebsd/contrib/blocklist/test/
H A Dsrvtest.c182 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/lib/libsys/
H A Drecvmmsg.c42 struct pollfd pfd[1]; in __ssp_real() local
49 pfd[0].fd = s; in __ssp_real()
50 pfd[0].revents = 0; in __ssp_real()
51 pfd[0].events = ev = POLLIN | POLLRDNORM | POLLRDBAND | in __ssp_real()
53 res = ppoll(&pfd[0], 1, timeout, NULL); in __ssp_real()
56 if (pfd[0].revents & POLLNVAL) { in __ssp_real()
60 if ((pfd[0].revents & ev) == 0) { in __ssp_real()
/freebsd/contrib/libfido2/src/
H A Dhid_unix.c54 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/contrib/netbsd-tests/lib/librumphijack/
H A Dh_client.c97 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/tools/ncpus/
H A Dbiosmptable.c125 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/sbin/ipf/libipf/
H A Dipft_pc.c56 static int pfd = -1, swapped = 0; variable
83 if (pfd != -1) in ipcap_open()
84 return (pfd); in ipcap_open()
114 pfd = fd; in ipcap_open()
126 return (close(pfd)); in ipcap_close()
142 i = read(pfd, (char *)rec, sizeof(*rec)); in ipcap_read_rec()
185 if (read(pfd, bufp, i) != i) in ipcap_read()
228 n = read(pfd, s, j); in ipcap_readip()
/freebsd/tools/regression/capsicum/syscalls/
H A Dcap_getmode.c47 int pfd; in main()
85 pid = pdfork(&pfd, 0); in main()
98 if (pdwait(pfd) == -1) in main()
100 close(pfd); in main()
144 pid = pdfork(&pfd, 0); in main()
157 if (pdwait(pfd) == -1) in main()
159 close(pfd); in main()
48 int pfd; main() local
/freebsd/contrib/libbegemot/
H A Drpoll.c154 struct pollfd *pfd; /* pointer to corresponding poll() structure */ member
173 static struct pollfd * pfd; /* fd list for poll() */ variable
269 p->pfd = NULL; in poll_register()
306 regs[handle].pfd = NULL; in poll_unregister()
325 f = pfd = _xrealloc(pfd, sizeof(pfd[0]) * regs_used); in poll_build()
338 p->pfd = f++; in poll_build()
340 assert(f == &pfd[regs_used]); in poll_build()
486 * a reallocation! The check for pfd != NULL is required, because
488 * to be called. So we clear pfd in unregister and check here.
539 ret = poll(pfd, regs_used, tout == INFTIM ? INFTIM : (tout / 1000)); in poll_dispatch()
[all …]

123456