Home
last modified time | relevance | path

Searched refs:revents (Results 1 – 25 of 209) sorted by relevance

123456789

/freebsd/contrib/netbsd-tests/lib/libc/sys/
H A Dt_poll.c173 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 Dsockpoll.c129 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 Dpipepoll.c106 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 Dquic_tests.c16 #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 Djaildesc.c60 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 Dprocdesc.c141 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 Dpoll_immediate.c24 #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 Dbridge.c321 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 Dev_poll.c112 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 Dverto-libev.c79 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 Dverto-k5ev.c113 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 Dbsd-poll.c83 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 Dzfsd.cc345 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 Drecvmmsg.c50 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 Dslirp-helper.c196 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 Dconsumer.cc235 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 Dsslio.c550 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 Dossl-nghttp3-demo-server.c483 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 Dsys_eventfd.c280 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 Dsnp.c319 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 Dlibmilter.h184 (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 Dworker.c439 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 Dmain.c298 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 Dlinux.cc76 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 Dmlfk_ipl.c442 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()

123456789