/openbsd/usr.bin/vi/ex/ |
H A D | ex_script.c | 358 nfds = 1; in sscr_check_input() 361 nfds++; in sscr_check_input() 371 nfds = 1; in sscr_check_input() 376 nfds++; in sscr_check_input() 394 nfds = 1; in sscr_check_input() 427 nfds = 0; in sscr_input() 430 nfds++; in sscr_input() 440 nfds = 0; in sscr_input() 445 nfds++; in sscr_input() 462 nfds = 0; in sscr_input() [all …]
|
/openbsd/lib/libevent/ |
H A D | poll.c | 120 for (i = 0; i < pop->nfds; ++i) { in poll_check_ok() 132 int res, i, j, msec = -1, nfds; in poll_dispatch() local 140 nfds = pop->nfds; in poll_dispatch() 141 res = poll(pop->event_set, nfds, msec); in poll_dispatch() 157 if (res == 0 || nfds == 0) in poll_dispatch() 160 i = arc4random_uniform(nfds); in poll_dispatch() 161 for (j = 0; j < nfds; j++) { in poll_dispatch() 164 if (++i == nfds) in poll_dispatch() 277 i = pop->nfds++; in poll_add() 339 --pop->nfds; in poll_del() [all …]
|
/openbsd/usr.bin/sndiod/ |
H A D | file.c | 236 f->max_nfds = nfds; in file_new() 237 f->nfds = 0; in file_new() 328 int nfds, res, timo; in file_poll() local 353 nfds = 0; in file_poll() 355 f->nfds = f->ops->pollfd(f->arg, pfds + nfds); in file_poll() 356 if (f->nfds == 0) in file_poll() 358 nfds += f->nfds; in file_poll() 383 if (f->nfds > 0) in file_poll() 413 res = poll(pfds, nfds, timo); in file_poll() 447 if (f->nfds == 0) in file_poll() [all …]
|
/openbsd/lib/libsndio/ |
H A D | mio.c | 87 int nfds; in mio_psleep() local 89 nfds = mio_nfds(hdl); in mio_psleep() 90 if (nfds > MIO_MAXNFDS) { in mio_psleep() 91 DPRINTF("mio_psleep: %d: too many descriptors\n", nfds); in mio_psleep() 96 nfds = mio_pollfd(hdl, pfd, event); in mio_psleep() 97 while (poll(pfd, nfds, -1) == -1) { in mio_psleep() 179 return hdl->ops->nfds(hdl); in mio_nfds()
|
H A D | sioctl.c | 71 int revents, nfds; in _sioctl_psleep() local 74 nfds = sioctl_pollfd(hdl, pfds, event); in _sioctl_psleep() 75 if (nfds == 0) in _sioctl_psleep() 77 while (poll(pfds, nfds, -1) < 0) { in _sioctl_psleep() 104 return hdl->ops->nfds(hdl); in sioctl_nfds()
|
H A D | sio.c | 242 int nfds; in sio_psleep() local 244 nfds = sio_nfds(hdl); in sio_psleep() 245 if (nfds > SIO_MAXNFDS) { in sio_psleep() 246 DPRINTF("sio_psleep: %d: too many descriptors\n", nfds); in sio_psleep() 251 nfds = sio_pollfd(hdl, pfd, event); in sio_psleep() 252 while (poll(pfd, nfds, -1) == -1) { in sio_psleep() 388 return hdl->ops->nfds(hdl); in sio_nfds()
|
/openbsd/sys/kern/ |
H A D | uipc_usrreq.c | 1052 int nfds, error = 0; in unp_externalize() local 1078 for (i = 0; i < nfds; i++) { in unp_externalize() 1115 for (i = 0; i < nfds; i++) { in unp_externalize() 1170 for (i = 0; i < nfds; i++) { in unp_externalize() 1184 unp_rights -= nfds; in unp_externalize() 1199 if (nfds > 0) { in unp_externalize() 1204 unp_discard(rp, nfds); in unp_externalize() 1239 unp_rights += nfds; in unp_internalize() 1280 for (i = 0; i < nfds; i++) { in unp_internalize() 1337 unp_rights -= nfds; in unp_internalize() [all …]
|
H A D | sys_generic.c | 845 while (!error && i++ < nfds) { in pollout() 934 if (nfds > nitems(pfds)) { in doppoll() 941 kqpoll_init(nfds); in doppoll() 943 sz = nfds * sizeof(*pl); in doppoll() 1012 error = pollout(pl, fds, nfds); in doppoll() 1018 error = pollout(pl, fds, nfds); in doppoll() 1023 ktrpollfd(p, pl, nfds); in doppoll() 1029 kqpoll_done(nfds); in doppoll() 1095 for (i = 0; i < nfds; i++) { in ppollregister() 1166 if (i >= nfds) { in ppollcollect() [all …]
|
/openbsd/gnu/usr.bin/perl/dist/IO/ |
H A D | poll.c | 44 poll(struct pollfd *fds, unsigned long nfds, int timeout) in poll() argument 63 for(i = 0 ; i < (int)nfds ; i++) { in poll() 96 for(i = 0 ; i < nfds ; i++) { in poll() 110 for(i = 0 ; i < (int)nfds ; i++) { in poll()
|
/openbsd/lib/libc/gen/ |
H A D | ftw.c | 32 int nfds) in ftw() argument 40 if (nfds < 1 || nfds > OPEN_MAX) { in ftw()
|
/openbsd/regress/sys/kern/unfdpass/ |
H A D | unfdpass.c | 261 int i, fd, nfds = 3; in child() 283 nfds = 5; in child() 284 len = CMSG_SPACE(sizeof(int) * nfds); in child() 293 cmp->cmsg_len = CMSG_LEN((sizeof(int) * nfds)); in child() 301 for (i = 0; i < nfds; i++) { in child() 262 int i, fd, nfds = 3; child() local
|
/openbsd/usr.sbin/ntpd/ |
H A D | ntp_dns.c | 62 int nfds, nullfd; in ntp_dns() local 113 if ((nfds = poll(pfd, 1, INFTIM)) == -1) in ntp_dns() 119 if (nfds > 0 && (pfd[0].revents & POLLOUT)) in ntp_dns() 126 if (nfds > 0 && pfd[0].revents & POLLIN) { in ntp_dns() 127 nfds--; in ntp_dns()
|
H A D | ntp.c | 74 int a, b, nfds, i, j, idx_peers, timeout; in ntp_main() local 375 nfds--; in ntp_main() 382 if (nfds > 0 && (pfd[PFD_PIPE_DNS].revents & POLLOUT)) in ntp_main() 390 nfds--; in ntp_main() 398 nfds--; in ntp_main() 402 for (j = PFD_MAX; nfds > 0 && j < idx_peers; j++) in ntp_main() 404 nfds--; in ntp_main() 411 for (; nfds > 0 && j < idx_clients; j++) { in ntp_main() 415 nfds--; in ntp_main() 437 for (; nfds > 0 && j < ctls; j++) { in ntp_main() [all …]
|
/openbsd/games/hunt/hunt/ |
H A D | playit.c | 186 int nfds, s_nfds; in getchr() local 198 nfds = s_nfds; in getchr() 199 nfds = select(nfds, &readfds, NULL, NULL, NULL); in getchr() 200 } while (nfds <= 0 && errno == EINTR); in getchr()
|
/openbsd/gnu/llvm/lldb/source/Utility/ |
H A D | SelectHelper.cpp | 131 const unsigned nfds = static_cast<unsigned>(*max_fd) + 1; in Select() local 142 read_fdset.resize((nfds / FD_SETSIZE) + 1); in Select() 146 write_fdset.resize((nfds / FD_SETSIZE) + 1); in Select() 150 error_fdset.resize((nfds / FD_SETSIZE) + 1); in Select() 214 const int num_set_fds = ::select(nfds, read_fdset_ptr, write_fdset_ptr, in Select()
|
/openbsd/lib/libc/sys/ |
H A D | w_poll.c | 22 poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument 27 ret = HIDDEN(poll)(fds, nfds, timeout); in poll()
|
H A D | w_select.c | 22 select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, in select() argument 28 ret = HIDDEN(select)(nfds, readfds, writefds, exceptfds, timeout); in select()
|
H A D | w_ppoll.c | 23 ppoll(struct pollfd *fds, nfds_t nfds, in ppoll() argument 36 ret = HIDDEN(ppoll)(fds, nfds, timeout, sigmask); in ppoll()
|
H A D | w_pselect.c | 23 pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, in pselect() argument 36 ret = HIDDEN(pselect)(nfds, readfds, writefds, exceptfds, timeout, in pselect()
|
/openbsd/usr.sbin/dhcpd/ |
H A D | dispatch.c | 304 int nfds, i, to_msec; in dispatch() local 310 for (nfds = 0, l = protocols; l; l = l->next) in dispatch() 311 nfds++; in dispatch() 313 nfds++; in dispatch() 314 if (nfds > nfds_max) { in dispatch() 315 fds = reallocarray(fds, nfds, sizeof(struct pollfd)); in dispatch() 318 nfds_max = nfds; in dispatch() 373 switch (poll(fds, nfds, to_msec)) { in dispatch()
|
H A D | pfutils.c | 53 int l, r, fd, nfds; in pftable_handler() local 75 if ((nfds = poll(pfd, 1, -1)) == -1) in pftable_handler() 79 if (nfds > 0 && (pfd[0].revents & POLLHUP)) in pftable_handler() 82 if (nfds > 0 && (pfd[0].revents & POLLIN)) { in pftable_handler()
|
/openbsd/usr.bin/tftp/ |
H A D | tftp.c | 136 int n, nfds, error, timeouts, size; in sendfile() local 186 nfds = poll(pfd, 1, rexmtval * 1000); in sendfile() 187 if (nfds == 0) { in sendfile() 191 if (nfds == -1) { in sendfile() 282 int n, nfds, error, timeouts, size; in recvfile() local 333 nfds = poll(pfd, 1, rexmtval * 1000); in recvfile() 334 if (nfds == 0) { in recvfile() 338 if (nfds == -1) { in recvfile()
|
/openbsd/sbin/ldattach/ |
H A D | ldattach.c | 68 int nfds, n, nread; in relay() local 77 nfds = poll(pfd, 2, INFTIM); in relay() 78 if (nfds == -1) { in relay() 82 if (nfds == 0) /* should not happen */ in relay()
|
/openbsd/usr.sbin/dhcrelay/ |
H A D | dispatch.c | 252 int count, i, to_msec, nfds = 0; in dispatch() local 257 nfds = 0; in dispatch() 259 nfds++; in dispatch() 261 fds = calloc(nfds, sizeof(struct pollfd)); in dispatch() 313 count = poll(fds, nfds, to_msec); in dispatch()
|
/openbsd/usr.sbin/dhcrelay6/ |
H A D | dispatch.c | 275 int count, i, to_msec, nfds = 0; in dispatch() local 280 nfds = 0; in dispatch() 282 nfds++; in dispatch() 284 fds = calloc(nfds, sizeof(struct pollfd)); in dispatch() 336 count = poll(fds, nfds, to_msec); in dispatch()
|