Home
last modified time | relevance | path

Searched refs:nfds (Results 1 – 25 of 63) sorted by relevance

123

/openbsd/usr.bin/vi/ex/
H A Dex_script.c358 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 Dpoll.c120 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 Dfile.c236 f->max_nfds = nfds; in file_new()
237 f->nfds = 0; in file_new()
320 int nfds, res, timo; in file_poll() local
345 nfds = 0; in file_poll()
347 f->nfds = f->ops->pollfd(f->arg, pfds + nfds); in file_poll()
348 if (f->nfds == 0) in file_poll()
350 nfds += f->nfds; in file_poll()
374 if (f->nfds > 0) in file_poll()
397 res = poll(pfds, nfds, timo); in file_poll()
431 if (f->nfds == 0) in file_poll()
[all …]
/openbsd/lib/libsndio/
H A Dmio.c87 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 Dsioctl.c71 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 Dsio.c242 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 Duipc_usrreq.c1048 int nfds, error = 0; in unp_externalize() local
1074 for (i = 0; i < nfds; i++) { in unp_externalize()
1111 for (i = 0; i < nfds; i++) { in unp_externalize()
1166 for (i = 0; i < nfds; i++) { in unp_externalize()
1180 unp_rights -= nfds; in unp_externalize()
1195 if (nfds > 0) { in unp_externalize()
1200 unp_discard(rp, nfds); in unp_externalize()
1235 unp_rights += nfds; in unp_internalize()
1276 for (i = 0; i < nfds; i++) { in unp_internalize()
1333 unp_rights -= nfds; in unp_internalize()
[all …]
H A Dsys_generic.c843 while (!error && i++ < nfds) { in pollout()
932 if (nfds > nitems(pfds)) { in doppoll()
939 kqpoll_init(nfds); in doppoll()
941 sz = nfds * sizeof(*pl); in doppoll()
1010 error = pollout(pl, fds, nfds); in doppoll()
1016 error = pollout(pl, fds, nfds); in doppoll()
1021 ktrpollfd(p, pl, nfds); in doppoll()
1027 kqpoll_done(nfds); in doppoll()
1093 for (i = 0; i < nfds; i++) { in ppollregister()
1164 if (i >= nfds) { in ppollcollect()
[all …]
/openbsd/gnu/usr.bin/perl/dist/IO/
H A Dpoll.c44 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 Dftw.c32 int nfds) in ftw() argument
40 if (nfds < 1 || nfds > OPEN_MAX) { in ftw()
/openbsd/regress/sys/kern/unfdpass/
H A Dunfdpass.c262 int i, fd, nfds = 3; in child() local
284 nfds = 5; in child()
285 len = CMSG_SPACE(sizeof(int) * nfds); in child()
294 cmp->cmsg_len = CMSG_LEN((sizeof(int) * nfds)); in child()
302 for (i = 0; i < nfds; i++) { in child()
/openbsd/usr.sbin/ntpd/
H A Dntp_dns.c62 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 Dntp.c74 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 Dplayit.c186 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 DSelectHelper.cpp131 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 Dw_poll.c22 poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument
27 ret = HIDDEN(poll)(fds, nfds, timeout); in poll()
H A Dw_select.c22 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 Dw_ppoll.c23 ppoll(struct pollfd *fds, nfds_t nfds, in ppoll() argument
36 ret = HIDDEN(ppoll)(fds, nfds, timeout, sigmask); in ppoll()
H A Dw_pselect.c23 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 Ddispatch.c304 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 Dpfutils.c53 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 Dtftp.c136 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 Dldattach.c68 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/sbin/dhclient/
H A Ddispatch.c91 int nfds; in dispatch() local
136 nfds = ppoll(fds, 3, ts, NULL); in dispatch()
137 if (nfds == -1) { in dispatch()
158 if (nfds == 0) in dispatch()
/openbsd/usr.sbin/dhcrelay/
H A Ddispatch.c252 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()

123