Home
last modified time | relevance | path

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

12345

/freebsd-11-stable/cddl/contrib/opensolaris/lib/libdtrace/common/
HDdt_printf.c55 pfcheck_addr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_addr() argument
62 pfcheck_kaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_kaddr() argument
70 pfcheck_uaddr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_uaddr() argument
86 pfcheck_stack(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_stack() argument
93 pfcheck_time(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_time() argument
101 pfcheck_str(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_str() argument
123 pfcheck_wstr(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_wstr() argument
140 pfcheck_csi(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_csi() argument
148 pfcheck_fp(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_fp() argument
155 pfcheck_xint(dt_pfargv_t *pfv, dt_pfargd_t *pfd, dt_node_t *dnp) in pfcheck_xint() argument
[all …]
/freebsd-11-stable/tools/regression/poll/
HDpipepoll.c92 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()
107 report(num++, "0", 0, pfd.revents, res, 0); in child()
123 if ((res = poll(&pfd, 1, 0)) < 0) in child()
125 report(num++, "1", 0, pfd.revents, res, 0); in child()
131 if ((res = poll(&pfd, 1, 0)) < 0) in child()
133 report(num++, "2", POLLIN, pfd.revents, res, 1); in child()
136 if ((res = poll(&pfd, 1, 0)) < 0) in child()
[all …]
/freebsd-11-stable/contrib/netcat/
HDnetcat.c690 struct pollfd pfd; in timeout_connect() local
702 pfd.fd = s; in timeout_connect()
703 pfd.events = POLLOUT; in timeout_connect()
704 if ((ret = poll(&pfd, 1, timeout)) == 1) { in timeout_connect()
796 struct pollfd pfd[4]; in readwrite() local
811 pfd[POLL_STDIN].fd = stdin_fd; in readwrite()
812 pfd[POLL_STDIN].events = POLLIN; in readwrite()
815 pfd[POLL_NETOUT].fd = net_fd; in readwrite()
816 pfd[POLL_NETOUT].events = 0; in readwrite()
819 pfd[POLL_NETIN].fd = net_fd; in readwrite()
[all …]
/freebsd-11-stable/tests/sys/file/
HDflock_helper.c188 int pfd[2]; in test2() local
193 if (pipe(pfd) < 0) in test2()
213 if (write(pfd[1], "a", 1) < 0) in test2()
223 if (read(pfd[0], &ch, 1) != 1) in test2()
234 close(pfd[0]); in test2()
235 close(pfd[1]); in test2()
259 int pfd[2]; in test3() local
264 if (pipe(pfd) < 0) in test3()
284 if (write(pfd[1], "a", 1) < 0) in test3()
294 if (read(pfd[0], &ch, 1) != 1) in test3()
[all …]
/freebsd-11-stable/crypto/openssh/regress/
HDnetcat.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 …]
/freebsd-11-stable/contrib/netbsd-tests/kernel/
HDmsg.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-11-stable/contrib/netbsd-tests/lib/libc/sys/
HDt_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-11-stable/contrib/apr/support/unix/
HDwaitio.c43 struct pollfd pfd; in apr_wait_for_io_or_timeout() local
47 pfd.fd = f ? f->filedes : s->socketdes; in apr_wait_for_io_or_timeout()
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()
[all …]
/freebsd-11-stable/tools/regression/netinet/tcpfullwindowrst/
HDtcpfullwindowrsttest.c67 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-11-stable/contrib/apr/poll/unix/
HDwakeup.c30 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-11-stable/contrib/ntp/sntp/libevent/
HDpoll.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 …]
/freebsd-11-stable/contrib/sendmail/libmilter/
HDworker.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-11-stable/contrib/blacklist/test/
HDsrvtest.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-11-stable/lib/libc/gen/
HDrecvmmsg.c44 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-11-stable/contrib/pf/libevent/
HDpoll.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-11-stable/contrib/netbsd-tests/lib/librumphijack/
HDh_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-11-stable/tools/regression/capsicum/syscalls/
HDcap_getmode.c51 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-11-stable/usr.sbin/daemon/
HDdaemon.c86 int pfd[2] = { -1, -1 }, outfd = -1; in main() local
255 if (pipe(pfd)) in main()
274 close(pfd[1]); in main()
275 pfd[1] = -1; in main()
289 close(pfd[0]); in main()
293 if (dup2(pfd[1], STDERR_FILENO) == -1) in main()
297 if (dup2(pfd[1], STDOUT_FILENO) == -1) in main()
300 if (pfd[1] != STDERR_FILENO && in main()
301 pfd[1] != STDOUT_FILENO) in main()
302 close(pfd[1]); in main()
[all …]
/freebsd-11-stable/crypto/openssh/
HDatomicio.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()
HDmonitor_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()
/freebsd-11-stable/tools/tools/ncpus/
HDbiosmptable.c128 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-11-stable/contrib/netbsd-tests/net/fdpass/
HDfdpass.c58 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()
/freebsd-11-stable/contrib/subversion/subversion/libsvn_ra_svn/
HDstreams.c54 static svn_boolean_t pending(apr_pollfd_t *pfd, apr_pool_t *pool) in pending() argument
59 pfd->p = pool; in pending()
60 pfd->reqevents = APR_POLLIN; in pending()
61 status = apr_poll(pfd, 1, &n, 0); in pending()
152 apr_pollfd_t pfd; in sock_pending_cb() local
154 pfd.desc_type = APR_POLL_SOCKET; in sock_pending_cb()
155 pfd.desc.s = b->sock; in sock_pending_cb()
157 *data_available = pending(&pfd, b->pool); in sock_pending_cb()
/freebsd-11-stable/usr.bin/talk/
HDctl_transact.c56 struct pollfd pfd[1]; in ctl_transact() local
62 pfd[0].fd = ctl_sockt; in ctl_transact()
63 pfd[0].events = POLLIN; in ctl_transact()
80 nready = poll(pfd, 1, CTL_WAIT * 1000); in ctl_transact()
99 nready = poll(pfd, 1, 0); in ctl_transact()
/freebsd-11-stable/contrib/openpam/lib/libpam/
HDopenpam_ttyconv.c92 struct pollfd pfd; in prompt_tty() local
145 pfd.fd = ifd; in prompt_tty()
146 pfd.events = POLLIN; in prompt_tty()
147 pfd.revents = 0; in prompt_tty()
158 if ((ret = poll(&pfd, 1, remaining_ms)) < 0) { in prompt_tty()
220 struct pollfd pfd; in prompt_notty() local
243 pfd.fd = STDIN_FILENO; in prompt_notty()
244 pfd.events = POLLIN; in prompt_notty()
245 pfd.revents = 0; in prompt_notty()
256 if ((ret = poll(&pfd, 1, remaining_ms)) < 0) { in prompt_notty()

12345