| /freebsd/contrib/netbsd-tests/lib/libc/sys/ |
| H A D | t_poll.c | 173 pfds[0].revents = -1; in ATF_TC_BODY() 174 pfds[1].revents = -1; 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() 181 pfds[0].revents = -1; in ATF_TC_BODY() 182 pfds[1].revents = -1; in ATF_TC_BODY() 185 ATF_REQUIRE_EQ_MSG(pfds[0].revents, -1, "got: %d", pfds[0].revents); in ATF_TC_BODY() 186 ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d",\ in ATF_TC_BODY() 187 pfds[1].revents); in ATF_TC_BODY() 190 pfds[0].revents = -1; in ATF_TC_BODY() [all …]
|
| /freebsd/tools/regression/poll/ |
| H A D | sockpoll.c | 129 report(num++, "initial 0", POLLOUT, pfd0.revents); in main() 132 report(num++, "initial 1", POLLOUT, pfd1.revents); in main() 137 report(num++, "after large write", 0, pfd0.revents); in main() 140 report(num++, "other side after large write", POLLIN | POLLOUT, pfd1.revents); in main() 144 report(num++, "other side after close", POLLIN | POLLHUP, pfd1.revents); in main() 149 report(num++, "other side after reading input", POLLHUP, pfd1.revents); in main() 158 report(num++, "after shutdown(SHUT_WR)", POLLOUT, pfd0.revents); in main() 161 report(num++, "other side after shutdown(SHUT_WR)", POLLIN | POLLOUT, pfd1.revents); in main() 173 report(num++, "other side after reading EOF", POLLIN | POLLOUT, pfd1.revents); in main() 178 report(num++, "after data from other side", POLLIN | POLLOUT, pfd0.revents); in main() [all …]
|
| H A D | pipepoll.c | 106 report(num++, "0", 0, pfd.revents, res, 0); in child() 124 report(num++, "1", 0, pfd.revents, res, 0); in child() 132 report(num++, "2", POLLIN, pfd.revents, res, 1); in child() 137 report(num++, "2a", 0, pfd.revents, res, 0); in child() 145 report(num++, "3", POLLHUP, pfd.revents, res, 1); in child() 160 report(num++, "4", 0, pfd.revents, res, 0); in child() 168 report(num++, "5", POLLIN, pfd.revents, res, 1); in child() 186 report(num++, "6", POLLIN | POLLHUP, pfd.revents, res, 1); in child() 191 report(num++, "6a", POLLHUP, pfd.revents, res, 1); in child() 203 report(num++, "6b", POLLHUP, pfd.revents, res, 1); in child() [all …]
|
| /freebsd/crypto/openssl/test/radix/ |
| H A D | quic_tests.c | 16 #undef revents 98 items[0].revents = 0; in DEF_FUNC() 103 items[i + 1].revents = 0; in DEF_FUNC() 116 expected_items[0].revents = SSL_POLL_EVENT_OS; in DEF_FUNC() 118 expected_items[1].revents = SSL_POLL_EVENT_R; in DEF_FUNC() 122 expected_items[i + 1].revents |= SSL_POLL_EVENT_W; in DEF_FUNC() 128 expected_items[1].revents = SSL_POLL_EVENT_R; in DEF_FUNC() 137 expected_items[5].revents = SSL_POLL_EVENT_IC; in DEF_FUNC() 155 if (!TEST_uint64_t_eq(items[i].revents, expected_items[i].revents)) in DEF_FUNC() 259 item.revents = 0; in DEF_FUNC() [all …]
|
| /freebsd/tests/sys/kern/ |
| H A D | jaildesc.c | 60 return ((void *)(uintptr_t)pfd.revents); in poll_jaildesc() 75 uintptr_t revents; in ATF_TC_BODY() local 88 error = pthread_join(thr, (void *)&revents); in ATF_TC_BODY() 90 ATF_REQUIRE_EQ(revents, POLLNVAL); in ATF_TC_BODY() 105 uintptr_t revents; in ATF_TC_BODY() local 119 error = pthread_join(thr, (void *)&revents); in ATF_TC_BODY() 121 ATF_REQUIRE_EQ(revents, POLLHUP); in ATF_TC_BODY() 162 uintptr_t revents; in ATF_TC_BODY() local 187 error = pthread_join(thr, (void *)&revents); in ATF_TC_BODY() 189 ATF_REQUIRE_EQ(revents, POLLNVAL); in ATF_TC_BODY()
|
| H A D | procdesc.c | 141 return ((void *)(uintptr_t)pfd.revents); in poll_procdesc() 153 uintptr_t revents; in ATF_TC_BODY() local 170 error = pthread_join(thr, (void *)&revents); in ATF_TC_BODY() 172 ATF_REQUIRE_EQ(revents, POLLNVAL); in ATF_TC_BODY() 182 uintptr_t revents; in ATF_TC_BODY() local 201 error = pthread_join(thr, (void *)&revents); in ATF_TC_BODY() 203 ATF_REQUIRE_EQ(revents, POLLHUP); in ATF_TC_BODY()
|
| /freebsd/crypto/openssl/ssl/rio/ |
| H A D | poll_immediate.c | 24 #undef revents 36 ITEM_N(items, stride, j).revents = 0; \ 46 ITEM_N(items, stride, idx_).revents = SSL_POLL_EVENT_F; \ 124 uint64_t revents = 0; in poll_translate_ssl_quic() local 140 if (!ossl_quic_conn_poll_events(ssl, events, /*do_tick = */ 0, &revents)) { in poll_translate_ssl_quic() 145 if (revents != 0) { in poll_translate_ssl_quic() 353 uint64_t revents; in poll_readout() local 360 revents = 0; in poll_readout() 374 if (!ossl_quic_conn_poll_events(ssl, events, do_tick, &revents)) in poll_readout() 378 if (revents != 0) in poll_readout() [all …]
|
| /freebsd/tools/tools/netmap/ |
| H A D | bridge.c | 321 pollfd[0].revents = pollfd[1].revents = 0; in main() 326 pollfd[1].revents = POLLOUT; in main() 331 pollfd[0].revents = POLLOUT; in main() 354 pollfd[0].revents, in main() 359 pollfd[1].revents, in main() 366 if (pollfd[0].revents & POLLERR) { in main() 371 if (pollfd[1].revents & POLLERR) { in main() 376 if (pollfd[0].revents & POLLOUT) { in main() 383 if (pollfd[1].revents & POLLOUT) { in main()
|
| /freebsd/crypto/krb5/src/util/verto/ |
| H A D | ev_poll.c | 112 if (expect_false (p->revents)) /* this expect is debatable */ in poll_poll() 116 if (expect_false (p->revents & POLLNVAL)) in poll_poll() 122 (p->revents & (POLLOUT | POLLERR | POLLHUP) ? EV_WRITE : 0) in poll_poll() 123 | (p->revents & (POLLIN | POLLERR | POLLHUP) ? EV_READ : 0) in poll_poll()
|
| H A D | verto-libev.c | 79 libev_callback(EV_P_ ev_watcher *w, int revents) in libev_callback() argument 91 if (revents & EV_READ) in libev_callback() 93 if (revents & EV_WRITE) in libev_callback() 95 if (revents & EV_ERROR) in libev_callback()
|
| H A D | verto-k5ev.c | 113 libev_callback(EV_P_ ev_watcher *w, int revents) in libev_callback() argument 125 if (revents & EV_READ) in libev_callback() 127 if (revents & EV_WRITE) in libev_callback() 129 if (revents & EV_ERROR) in libev_callback()
|
| /freebsd/crypto/openssh/openbsd-compat/ |
| H A D | bsd-poll.c | 83 fds[i].revents = 0; in ppoll() 87 fds[i].revents |= POLLIN; in ppoll() 89 fds[i].revents |= POLLOUT; in ppoll() 91 fds[i].revents |= POLLPRI; in ppoll()
|
| /freebsd/cddl/usr.sbin/zfsd/ |
| H A D | zfsd.cc | 345 fds[0].revents = 0; in EventLoop() 348 fds[1].revents = 0; in EventLoop() 359 if ((fds[0].revents & POLLIN) != 0) in EventLoop() 362 if ((fds[1].revents & POLLIN) != 0) { in EventLoop() 382 if ((fds[0].revents & POLLERR) != 0) { in EventLoop() 387 if ((fds[0].revents & POLLHUP) != 0) { in EventLoop()
|
| /freebsd/lib/libsys/ |
| H A D | recvmmsg.c | 50 pfd[0].revents = 0; in __ssp_real() 56 if (pfd[0].revents & POLLNVAL) { in __ssp_real() 60 if ((pfd[0].revents & ev) == 0) { in __ssp_real()
|
| /freebsd/usr.sbin/bhyve/slirp/ |
| H A D | slirp-helper.c | 196 pollfd->revents = 0; in slirp_addpoll() 216 short revents; in slirp_poll_revents() local 225 revents = pollfd->revents; in slirp_poll_revents() 227 revents &= ~POLLHUP; in slirp_poll_revents() 228 return (pollev2slirpev(revents)); in slirp_poll_revents() 270 if ((pollfds[wakeup].revents & POLLIN) != 0) { in slirp_pollfd_loop() 286 if ((pollfds[input].revents & (POLLHUP | POLLRDHUP)) != 0) in slirp_pollfd_loop() 288 if ((pollfds[input].revents & POLLIN) != 0) { in slirp_pollfd_loop()
|
| /freebsd/lib/libdevdctl/ |
| H A D | consumer.cc | 235 fds->revents = 0; in EventsPending() 242 if ((fds->revents & POLLERR) != 0) in EventsPending() 246 if ((fds->revents & POLLHUP) != 0) in EventsPending() 250 return ((fds->revents & POLLIN) != 0); in EventsPending()
|
| /freebsd/contrib/bearssl/tools/ |
| H A D | sslio.c | 550 pfd[u].revents = 0; in run_ssl_engine() 563 pfd[u].revents = 0; in run_ssl_engine() 570 pfd[u].revents = 0; in run_ssl_engine() 594 if (pfd[u].revents & (POLLERR | POLLHUP)) { in run_ssl_engine() 595 pfd[u].revents |= POLLIN | POLLOUT; in run_ssl_engine() 599 recvapp_ok = recvapp && (pfd[k_out].revents & POLLOUT) != 0; in run_ssl_engine() 600 sendrec_ok = sendrec && (pfd[k_fd].revents & POLLOUT) != 0; in run_ssl_engine() 601 recvrec_ok = recvrec && (pfd[k_fd].revents & POLLIN) != 0; in run_ssl_engine() 602 sendapp_ok = sendapp && (pfd[k_in].revents & POLLIN) != 0; in run_ssl_engine()
|
| /freebsd/crypto/openssl/demos/http3/ |
| H A D | ossl-nghttp3-demo-server.c | 483 item->revents = UINT64_MAX; /* TODO adjust to the event we need process */ in read_from_ssl_ids() 520 if (item->revents == SSL_POLL_EVENT_NONE) in read_from_ssl_ids() 527 if (item->revents & SSL_POLL_EVENT_IC) { in read_from_ssl_ids() 576 if ((item->revents & SSL_POLL_EVENT_ISB) || (item->revents & SSL_POLL_EVENT_ISU)) { in read_from_ssl_ids() 615 if (item->revents & SSL_POLL_EVENT_ISB) in read_from_ssl_ids() 617 if (item->revents & SSL_POLL_EVENT_ISU) in read_from_ssl_ids() 620 if (item->revents & SSL_POLL_EVENT_OSB) { in read_from_ssl_ids() 626 if (item->revents & SSL_POLL_EVENT_OSU) { in read_from_ssl_ids() 643 if (item->revents & SSL_POLL_EVENT_EC) { in read_from_ssl_ids() 655 if (item->revents & SSL_POLL_EVENT_ECD) { in read_from_ssl_ids() [all …]
|
| /freebsd/sys/kern/ |
| H A D | sys_eventfd.c | 280 int revents; in eventfd_poll() local 283 revents = 0; in eventfd_poll() 286 revents |= events & (POLLIN | POLLRDNORM); in eventfd_poll() 289 revents |= events & (POLLOUT | POLLWRNORM); in eventfd_poll() 290 if (revents == 0) in eventfd_poll() 294 return (revents); in eventfd_poll()
|
| /freebsd/sys/dev/snp/ |
| H A D | snp.c | 319 int revents; in snp_poll() local 325 revents = 0; in snp_poll() 332 revents |= events & (POLLIN | POLLRDNORM); in snp_poll() 337 if (revents == 0) in snp_poll() 340 return (revents); in snp_poll()
|
| /freebsd/contrib/sendmail/libmilter/ |
| H A D | libmilter.h | 184 (rds).revents = 0 189 (wrs).revents = 0 192 (((rds).revents & (POLLERR | POLLHUP | POLLNVAL)) != 0) 195 (((wrs).revents & MI_POLL_WR_FLAGS) != 0) 198 (((rds).revents & MI_POLL_RD_FLAGS) != 0)
|
| H A D | worker.c | 439 pfd[nfd].revents = 0; 489 pfd[nfd].revents = 0; 531 if (pfd[i].revents == 0) 546 pfd[i].events, pfd[i].revents)); 549 while ((pfd[i].revents & MI_POLL_RD_FLAGS) != 0 559 if ((pfd[i].revents & ~MI_POLL_RD_FLAGS) != 0)
|
| /freebsd/usr.sbin/ngctl/ |
| H A D | main.c | 298 if (pfds[0].revents != 0) in Monitor() 300 if (pfds[1].revents != 0) in Monitor() 401 pfds[2].revents = 0; in DoInteractive() 405 if (pfds[2].revents == 0) in DoInteractive() 408 if (pfds[0].revents != 0) in DoInteractive() 410 if (pfds[1].revents != 0) in DoInteractive() 414 if (pfds[2].revents != 0) { in DoInteractive()
|
| /freebsd/tests/sys/capsicum/ |
| H A D | linux.cc | 76 poll_fd.revents = 0; in TEST() 85 EXPECT_EQ(0, (poll_fd.revents & POLLIN)); in TEST() 86 EXPECT_NE(0, (poll_fd.revents & POLLNVAL)); in TEST() 91 EXPECT_NE(0, (poll_fd.revents & POLLIN)); in TEST() 92 EXPECT_EQ(0, (poll_fd.revents & POLLNVAL)); in TEST() 173 poll_fd.revents = 0; in FORK_TEST() 177 EXPECT_EQ(0, (poll_fd.revents & POLLIN)); in FORK_TEST() 178 EXPECT_NE(0, (poll_fd.revents & POLLNVAL)); in FORK_TEST() 182 EXPECT_NE(0, (poll_fd.revents & POLLIN)); in FORK_TEST() 183 EXPECT_EQ(0, (poll_fd.revents & POLLNVAL)); in FORK_TEST() [all …]
|
| /freebsd/sys/netpfil/ipfilter/netinet/ |
| H A D | mlfk_ipl.c | 442 int revents; in ipfpoll() local 447 revents = 0; in ipfpoll() 457 revents |= events & (POLLIN | POLLRDNORM); in ipfpoll() 462 revents |= events & (POLLIN | POLLRDNORM); in ipfpoll() 466 revents |= events & (POLLIN | POLLRDNORM); in ipfpoll() 468 revents |= events & (POLLOUT | POLLWRNORM); in ipfpoll() 476 if ((revents == 0) && ((events & (POLLIN|POLLRDNORM)) != 0)) in ipfpoll() 480 return (revents); in ipfpoll()
|