| /openbsd/src/regress/lib/libc/sys/ |
| D | t_pollts.c | 80 pfds[0].revents = -1; in ATF_TC_BODY() 81 pfds[1].revents = -1; in ATF_TC_BODY() 84 ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents); in ATF_TC_BODY() 85 ATF_REQUIRE_EQ_MSG(pfds[1].revents, -1, "got: %d", pfds[1].revents); in ATF_TC_BODY() 88 pfds[0].revents = -1; in ATF_TC_BODY() 89 pfds[1].revents = -1; in ATF_TC_BODY() 92 ATF_REQUIRE_EQ_MSG(pfds[0].revents, -1, "got: %d", pfds[0].revents); in ATF_TC_BODY() 93 ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d",\ in ATF_TC_BODY() 94 pfds[1].revents); in ATF_TC_BODY() 97 pfds[0].revents = -1; in ATF_TC_BODY() [all …]
|
| D | t_poll.c | 176 pfds[0].revents = -1; in ATF_TC_BODY() 177 pfds[1].revents = -1; in ATF_TC_BODY() 180 ATF_REQUIRE_EQ_MSG(pfds[0].revents, 0, "got: %d", pfds[0].revents); in ATF_TC_BODY() 181 ATF_REQUIRE_EQ_MSG(pfds[1].revents, -1, "got: %d", pfds[1].revents); in ATF_TC_BODY() 184 pfds[0].revents = -1; in ATF_TC_BODY() 185 pfds[1].revents = -1; in ATF_TC_BODY() 188 ATF_REQUIRE_EQ_MSG(pfds[0].revents, -1, "got: %d", pfds[0].revents); in ATF_TC_BODY() 189 ATF_REQUIRE_EQ_MSG(pfds[1].revents, POLLOUT, "got: %d",\ in ATF_TC_BODY() 190 pfds[1].revents); in ATF_TC_BODY() 193 pfds[0].revents = -1; in ATF_TC_BODY() [all …]
|
| /openbsd/src/regress/lib/libpthread/poll/ |
| D | poll.c | 25 p->revents & POLLIN ? "in " : "", in print_pollfd() 26 p->revents & POLLOUT ? "out " : "", in print_pollfd() 27 p->revents & POLLERR ? "err " : "", in print_pollfd() 28 p->revents & POLLHUP ? "hup " : "", in print_pollfd() 29 p->revents & POLLNVAL ? "nval " : "" in print_pollfd() 72 p[0].revents = 0; in main() 75 p[1].revents = 0; in main() 80 ASSERT((p[0].revents & POLLIN) == POLLIN); in main() 81 ASSERT((p[1].revents & POLLOUT) == POLLOUT); in main() 97 ASSERT((p[0].revents & POLLNVAL) == POLLNVAL); in main() [all …]
|
| /openbsd/src/regress/sys/fifofs/ |
| D | fifotest.out | 6 1 fd(s) ready, revents == POLLOUT 10 1 fd(s) ready, revents == POLLOUT 24 1 fd(s) ready, revents == POLLIN POLLOUT 26 1 fd(s) ready, revents == POLLIN 28 1 fd(s) ready, revents == POLLOUT 45 1 fd(s) ready, revents == POLLOUT 49 1 fd(s) ready, revents == POLLOUT 63 1 fd(s) ready, revents == POLLIN POLLOUT 65 1 fd(s) ready, revents == POLLIN 67 1 fd(s) ready, revents == POLLOUT [all …]
|
| D | fifotest.c | 302 if (pfd.revents & POLLIN) in dopoll() 304 if (pfd.revents & POLLOUT) in dopoll() 306 if (pfd.revents & POLLERR) in dopoll() 308 if (pfd.revents & POLLHUP) in dopoll() 310 if (pfd.revents & POLLNVAL) in dopoll()
|
| /openbsd/src/gnu/usr.bin/perl/dist/IO/ |
| D | poll.c | 67 fds[i].revents = 0; in poll() 111 int revents = (fds[i].events & POLL_EVENTS_MASK); in poll() local 118 revents = POLLNVAL; in poll() 121 revents &= ~POLL_CAN_READ; in poll() 124 revents &= ~POLL_CAN_WRITE; in poll() 127 revents &= ~POLL_HAS_EXCP; in poll() 130 if((fds[i].revents = revents) != 0) in poll()
|
| /openbsd/src/lib/libsndio/ |
| D | mio_aucat.c | 165 int revents = pfd->revents; in mio_aucat_revents() local 167 if (revents & POLLIN) { in mio_aucat_revents() 173 revents &= ~POLLIN; in mio_aucat_revents() 175 if (revents & POLLOUT) { in mio_aucat_revents() 177 revents &= ~POLLOUT; in mio_aucat_revents() 181 return revents & (hdl->events | POLLHUP); in mio_aucat_revents()
|
| D | sio.c | 241 int revents; in sio_psleep() local 259 revents = sio_revents(hdl, pfd); in sio_psleep() 260 if (revents & POLLHUP) { in sio_psleep() 264 if (revents & event) in sio_psleep() 404 int revents; in sio_revents() local 416 revents = hdl->ops->revents(hdl, pfd); in sio_revents() 418 return revents & POLLHUP; in sio_revents() 425 revents, in sio_revents() 431 revents &= ~POLLOUT; in sio_revents() 433 revents &= ~POLLIN; in sio_revents() [all …]
|
| D | sioctl.c | 71 int revents, nfds; in _sioctl_psleep() local 84 revents = sioctl_revents(hdl, pfds); in _sioctl_psleep() 85 if (revents & POLLHUP) { in _sioctl_psleep() 89 if (event == 0 || (revents & event)) in _sioctl_psleep() 120 return hdl->ops->revents(hdl, pfd); in sioctl_revents()
|
| D | mio.c | 86 int revents; in mio_psleep() local 104 revents = mio_revents(hdl, pfd); in mio_psleep() 105 if (revents & POLLHUP) { in mio_psleep() 109 if (revents & event) in mio_psleep() 195 return hdl->ops->revents(hdl, pfd); in mio_revents()
|
| D | sioctl_aucat.c | 254 int revents; in sioctl_aucat_revents() local 256 revents = _aucat_revents(&hdl->aucat, pfd); in sioctl_aucat_revents() 257 if (revents & POLLIN) { in sioctl_aucat_revents() 268 revents &= ~POLLIN; in sioctl_aucat_revents() 272 DPRINTFN(3, "sioctl_aucat_revents: revents = 0x%x\n", revents); in sioctl_aucat_revents() 273 return revents; in sioctl_aucat_revents()
|
| D | sio_aucat.c | 471 int revents = pfd->revents; in sio_aucat_revents() local 473 if (revents & POLLIN) { in sio_aucat_revents() 479 revents &= ~POLLIN; in sio_aucat_revents() 481 if (revents & POLLOUT) { in sio_aucat_revents() 483 revents &= ~POLLOUT; in sio_aucat_revents() 487 DPRINTFN(3, "sio_aucat_revents: %x\n", revents & hdl->events); in sio_aucat_revents() 488 return revents & (hdl->events | POLLHUP); in sio_aucat_revents()
|
| /openbsd/src/usr.bin/rsync/ |
| D | receiver.c | 333 if (pfd[i].revents & (POLLERR|POLLNVAL)) { in rsync_receiver() 336 } else if (pfd[i].revents & POLLHUP) { in rsync_receiver() 351 (pfd[PFD_SENDER_IN].revents & POLLIN)) { in rsync_receiver() 356 pfd[PFD_SENDER_IN].revents &= ~POLLIN; in rsync_receiver() 366 if ((pfd[PFD_UPLOADER_IN].revents & POLLIN) || in rsync_receiver() 367 (pfd[PFD_SENDER_OUT].revents & POLLOUT)) { in rsync_receiver() 386 if ((pfd[PFD_SENDER_IN].revents & POLLIN) || in rsync_receiver() 387 (pfd[PFD_DOWNLOADER_IN].revents & POLLIN)) { in rsync_receiver()
|
| D | sender.c | 456 if (pfd[i].revents & (POLLERR|POLLNVAL)) { in rsync_sender() 459 } else if (pfd[i].revents & POLLHUP) { in rsync_sender() 472 if (sess->mplex_reads && (pfd[0].revents & POLLIN)) { in rsync_sender() 483 pfd[0].revents &= ~POLLIN; in rsync_sender() 494 if (pfd[0].revents & POLLIN) { in rsync_sender() 520 if (pfd[2].revents & POLLIN) { in rsync_sender() 561 if ((pfd[1].revents & POLLOUT) && wbufsz > 0) { in rsync_sender() 572 pfd[1].revents &= ~POLLOUT; in rsync_sender() 584 if (pfd[1].revents & POLLOUT && up.cur != NULL) { in rsync_sender()
|
| D | io.c | 47 return (pfd.revents & POLLIN); in io_read_check() 79 } else if ((pfd.revents & (POLLERR|POLLNVAL))) { in io_write_nonblocking() 82 } else if ((pfd.revents & POLLHUP)) { in io_write_nonblocking() 85 } else if (!(pfd.revents & POLLOUT)) { in io_write_nonblocking() 210 } else if ((pfd.revents & (POLLERR|POLLNVAL))) { in io_read_nonblocking() 213 } else if (!(pfd.revents & (POLLIN|POLLHUP))) { in io_read_nonblocking()
|
| /openbsd/src/sys/kern/ |
| D | sys_generic.c | 846 error = copyout(&pl->revents, &upl->revents, in pollout() 847 sizeof(upl->revents)); in pollout() 1040 KASSERT(pl->revents == 0); in ppollregister_evts() 1053 pl->revents |= POLLNVAL; in ppollregister_evts() 1070 pl->fd, pl->revents, p->p_kq_serial, kevp->filter, in ppollregister_evts() 1074 pl->revents |= POLLERR; in ppollregister_evts() 1097 pl[i].revents = 0; in ppollregister() 1144 if (pl[i].revents != 0) in ppollregister() 1184 already_seen = (pl[i].revents != 0); in ppollcollect() 1188 pl[i].revents = POLLNVAL; in ppollcollect() [all …]
|
| /openbsd/src/usr.bin/sndiod/ |
| D | file.c | 249 int rc, revents; in file_process() local 260 revents = (f->state != FILE_ZOMB) ? in file_process() 261 f->ops->revents(f->arg, pfd) : 0; in file_process() 262 if ((revents & POLLHUP) && (f->state != FILE_ZOMB)) { in file_process() 266 if ((revents & POLLIN) && (f->state != FILE_ZOMB)) { in file_process() 270 if ((revents & POLLOUT) && (f->state != FILE_ZOMB)) { in file_process() 299 ret ? pfd->revents : pfd->events); in filelist_fmt()
|
| /openbsd/src/regress/usr.sbin/bgpd/integrationtests/ |
| D | api-exabgp.c | 71 if (pfd[0].revents & POLLIN) { in main() 82 if (pfd[1].revents & POLLIN) { in main() 91 if (pfd[1].revents & POLLHUP) { in main()
|
| /openbsd/src/regress/lib/libsndio/fd/ |
| D | fd.c | 190 int ch, recfd, playfd, nfds, events, revents; in main() local 326 revents = sio_revents(hdl, pfd); in main() 327 if (revents & POLLHUP) { in main() 331 if (revents & POLLIN) { in main() 335 if (revents & POLLOUT) { in main()
|
| /openbsd/src/usr.sbin/radiusd/ |
| D | imsg_subr.c | 48 if (retval > 0 && (fds[0].revents & POLLIN) != 0) in imsg_sync_read() 74 if (retval > 0 && (fds[0].revents & POLLOUT) != 0) in imsg_sync_flush()
|
| /openbsd/src/usr.sbin/nsd/ |
| D | netio.c | 149 fds[numfd].revents = 0; in netio_dispatch() 238 if ((fds[handler->pfd].revents & POLLIN)) { in netio_dispatch() 241 if ((fds[handler->pfd].revents & POLLOUT)) { in netio_dispatch() 244 if ((fds[handler->pfd].revents & in netio_dispatch()
|
| /openbsd/src/regress/bin/ksh/edit/ |
| D | edit.c | 120 if (pfd.revents & (POLLERR | POLLNVAL)) in main() 123 if (pfd.revents & (POLLIN | POLLHUP)) { in main() 138 } else if (pfd.revents & POLLOUT) { in main()
|
| /openbsd/src/usr.bin/telnet/ |
| D | sys_bsd.c | 536 if (pfd[TELNET_FD_NET].revents & POLLRDBAND) { in process_rings() 544 if (pfd[TELNET_FD_NET].revents & (POLLIN|POLLHUP)) { in process_rings() 565 if (pfd[TELNET_FD_TIN].revents & (POLLIN|POLLHUP)) { in process_rings() 589 if (pfd[TELNET_FD_NET].revents & POLLOUT) { in process_rings() 592 if (pfd[TELNET_FD_TOUT].revents & POLLOUT) { in process_rings()
|
| /openbsd/src/usr.bin/talk/ |
| D | io.c | 92 if (fds[1].revents & POLLIN) { in talk() 99 if (fds[0].revents & POLLIN) { in talk()
|
| /openbsd/src/lib/libc/rpc/ |
| D | svc.c | 160 svc_pollfd[slot].events = svc_pollfd[slot].revents = 0; in svc_fd_insert() 217 svc_pollfd[slot].events = svc_pollfd[slot].revents = 0; in svc_fd_remove() 249 svc_pollfd[i].revents = 0; in svc_fd_remove() 546 if (pfd[i].revents != 0) in svc_getreq_poll() 548 if ((pfd[i].revents & (POLLIN | POLLHUP)) == 0) in svc_getreq_poll()
|