Home
last modified time | relevance | path

Searched refs:pfds (Results 1 – 17 of 17) sorted by relevance

/freebsd/contrib/netbsd-tests/lib/libc/sys/
H A Dt_poll.c159 struct pollfd pfds[2]; in ATF_TC_BODY() local
164 pfds[0].fd = fds[0]; in ATF_TC_BODY()
165 pfds[0].events = POLLIN; in ATF_TC_BODY()
166 pfds[1].fd = fds[1]; in ATF_TC_BODY()
167 pfds[1].events = POLLOUT; in ATF_TC_BODY()
173 pfds[0].revents = -1; in ATF_TC_BODY()
174 pfds[1].revents = -1; in ATF_TC_BODY()
175 ATF_REQUIRE_EQ_MSG(ret = poll(&pfds[0], 1, 1), 0, in ATF_TC_BODY()
177 ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents); in ATF_TC_BODY()
178 ATF_REQUIRE_EQ_MSG(pfds[1].revents, -1, "got: %d", pfds[1].revents); in ATF_TC_BODY()
[all …]
/freebsd/crypto/openssl/ssl/rio/
H A Dpoll_builder.c29 rpb->pfd_alloc = OSSL_NELEM(rpb->pfds); in OSSL_SAFE_MATH_UNSIGNED()
64 memcpy(pfd_heap_new, rpb->pfds, sizeof(rpb->pfds)); in rpb_ensure_alloc()
77 struct pollfd *pfds = (rpb->pfd_heap != NULL ? rpb->pfd_heap : rpb->pfds); in ossl_rio_poll_builder_add_fd() local
109 pfd = &pfds[i]; in ossl_rio_poll_builder_add_fd()
118 pfds = rpb->pfd_heap; in ossl_rio_poll_builder_add_fd()
121 …assert((rpb->pfd_heap != NULL && rpb->pfd_heap == pfds) || (rpb->pfd_heap == NULL && rpb->pfds == … in ossl_rio_poll_builder_add_fd()
124 if (i == rpb->pfd_num || pfds[i].fd == -1) in ossl_rio_poll_builder_add_fd()
125 pfds[i].events = 0; in ossl_rio_poll_builder_add_fd()
126 pfds[i].fd = fd; in ossl_rio_poll_builder_add_fd()
129 pfds[i].events |= POLLIN; in ossl_rio_poll_builder_add_fd()
[all …]
H A Dpoll_builder.h34 struct pollfd pfds[RIO_NUM_STACK_PFDS];
/freebsd/bin/pwait/tests/
H A Dpwait_reap.c44 struct pollfd pfds[2]; in pwait_is_waiting() local
48 pfds[0].fd = pwout; in pwait_is_waiting()
49 pfds[0].events = POLLIN; in pwait_is_waiting()
50 pfds[1].fd = pwerr; in pwait_is_waiting()
51 pfds[1].events = POLLIN; in pwait_is_waiting()
57 } while ((ret = poll(pfds, 2, 100)) == 0); in pwait_is_waiting()
59 ATF_REQUIRE_EQ(pfds[1].revents, POLLIN); in pwait_is_waiting()
78 struct pollfd pfds[2]; in pwait_is_done() local
82 pfds[0].fd = pwout; in pwait_is_done()
83 pfds[0].events = POLLIN; in pwait_is_done()
[all …]
/freebsd/share/examples/sound/
H A Dpoll.c41 struct pollfd pfds[1]; in main() local
48 pfds[0].fd = config.fd; in main()
49 pfds[0].events = POLLOUT; in main()
50 if (poll(pfds, sizeof(pfds) / sizeof(struct pollfd), -1) < 0) in main()
52 if (pfds[0].revents != 0) { in main()
/freebsd/crypto/openssl/ssl/quic/
H A Dquic_reactor.c346 struct pollfd pfds[3] = { 0 }; in poll_two_fds()
350 pfds[npfd].fd = rfd; in poll_two_fds()
351 pfds[npfd].events = (rfd_want_read ? POLLIN : 0) in poll_two_fds()
353 if (rfd >= 0 && pfds[npfd].events != 0) in poll_two_fds()
356 pfds[npfd].fd = rfd; in poll_two_fds()
357 pfds[npfd].events = (rfd_want_read ? POLLIN : 0); in poll_two_fds()
358 if (rfd >= 0 && pfds[npfd].events != 0) in poll_two_fds()
361 pfds[npfd].fd = wfd; in poll_two_fds()
362 pfds[npfd].events = (wfd_want_write ? POLLOUT : 0); in poll_two_fds()
363 if (wfd >= 0 && pfds[npfd].events != 0) in poll_two_fds()
[all …]
/freebsd/crypto/openssl/test/
H A Drio_poll_builder_test.c17 struct pollfd *pfds; in test_duplicate_fd() local
27 pfds = rpb.pfd_heap != NULL ? rpb.pfd_heap : rpb.pfds; in test_duplicate_fd()
29 || !TEST_int_eq(pfds[0].events, POLLIN | POLLOUT)) in test_duplicate_fd()
/freebsd/usr.sbin/ngctl/
H A Dmain.c276 struct pollfd pfds[2] = { in Monitor() local
290 if (poll(pfds, 2, INFTIM) <= 0) { in Monitor()
298 if (pfds[0].revents != 0) in Monitor()
300 if (pfds[1].revents != 0) in Monitor()
382 struct pollfd pfds[3] = { in DoInteractive() local
394 if (poll(pfds, 2, 0) <= 0) { in DoInteractive()
398 if (poll(pfds, 3, INFTIM) < 0 && errno != EINTR) in DoInteractive()
401 pfds[2].revents = 0; in DoInteractive()
405 if (pfds[2].revents == 0) in DoInteractive()
408 if (pfds[0].revents != 0) in DoInteractive()
[all …]
H A Dmsg.c66 struct pollfd pfds[1] = { in MsgCmd() local
100 switch (poll(pfds, 1, 0)) { in MsgCmd()
/freebsd/usr.sbin/rtadvd/
H A Dcontrol.c65 struct pollfd pfds[1]; in cm_recv() local
74 pfds[0].fd = fd; in cm_recv()
75 pfds[0].events = POLLIN; in cm_recv()
78 i = poll(pfds, nitems(pfds), in cm_recv()
90 if (pfds[0].revents & POLLIN) { in cm_recv()
134 i = poll(pfds, nitems(pfds), in cm_recv()
146 if (pfds[0].revents & POLLIN) { in cm_recv()
/freebsd/sys/contrib/openzfs/lib/libzfs/os/linux/
H A Dlibzfs_util_os.c162 struct pollfd pfds[] = { in libzfs_load_module() local
166 while (poll(pfds, ARRAY_SIZE(pfds), -1) != -1) { in libzfs_load_module()
167 if (pfds[0].revents & POLLIN) { in libzfs_load_module()
176 if (pfds[1].revents & POLLIN) in libzfs_load_module()
/freebsd/tools/regression/sockets/udp_pingpong/
H A Dudp_pingpong.c81 struct pollfd pfds[2]; member
248 tcp->pfds[i].fd = tcp->fds[i]; in setup_udp()
249 tcp->pfds[i].events = POLLIN; in setup_udp()
293 tcp->pfds[i].fd = tcp->fds[i]; in setup_udp6()
294 tcp->pfds[i].events = POLLIN; in setup_udp6()
439 pr = poll(&tcp->pfds[fdidx], 1, tout); in recv_pkt()
446 if(tcp->pfds[fdidx].revents != POLLIN) { in recv_pkt()
/freebsd/contrib/ldns/
H A Dnet.c167 struct pollfd pfds[2]; in ldns_sock_wait() local
169 memset(&pfds[0], 0, sizeof(pfds[0]) * 2); in ldns_sock_wait()
171 pfds[0].fd = sockfd; in ldns_sock_wait()
172 pfds[0].events = POLLIN|POLLERR; in ldns_sock_wait()
175 pfds[0].events |= POLLOUT; in ldns_sock_wait()
178 ret = poll(pfds, 1, (int)(timeout.tv_sec * 1000 in ldns_sock_wait()
/freebsd/usr.sbin/rpcbind/
H A Drpcb_svc_com.c1179 check_rmtcalls(struct pollfd *pfds, int nfds) in check_rmtcalls() argument
1189 if ((xprt = find_rmtcallxprt_by_fd(pfds[j].fd)) != NULL) { in check_rmtcalls()
1190 if (pfds[j].revents) { in check_rmtcalls()
1196 __func__, pfds[j].fd, xprt->xp_netid); in check_rmtcalls()
1198 handle_reply(pfds[j].fd, xprt); in check_rmtcalls()
1199 pfds[j].revents = 0; in check_rmtcalls()
/freebsd/crypto/openssh/
H A Dchannels.c597 c->pfds[0] = -1; in channel_close_fd()
603 c->pfds[1] = -1; in channel_close_fd()
609 c->pfds[2] = -1; in channel_close_fd()
615 c->pfds[3] = -1; in channel_close_fd()
2769 c->pfds[0], c->pfds[1], c->pfds[2], c->pfds[3], in dump_channel_poll()
2789 c->pfds[0] = c->pfds[1] = c->pfds[2] = c->pfds[3] = -1; in channel_prepare_pollfd()
2822 c->pfds[0] = p; in channel_prepare_pollfd()
2836 c->pfds[1] = p; in channel_prepare_pollfd()
2852 c->pfds[2] = p; in channel_prepare_pollfd()
2868 c->pfds[3] = p; in channel_prepare_pollfd()
[all …]
H A Dchannels.h145 int pfds[4]; /* pollfd entries for rfd/wfd/efd/sock */ member
/freebsd/contrib/ntp/ntpd/
H A Dntp_io.c3816 const fd_set * pfds argument
3851 if (!FD_ISSET(fd, pfds))
3895 if (FD_ISSET(fd, pfds))
3913 if (FD_ISSET(asyncio_reader->fd, pfds))
3926 if (FD_ISSET(c->resp_read_pipe, pfds)) {