Home
last modified time | relevance | path

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

1234

/freebsd/lib/libnv/
H A Dmsgio.c234 PJDLOG_ASSERT(nfds > 0); in fd_package_send()
282 PJDLOG_ASSERT(nfds > 0); in fd_package_recv()
308 while (cmsg && i < nfds) { in fd_package_recv()
317 if (i + n > nfds) { in fd_package_recv()
349 for (i = 0; i < nfds; i++) { in fd_package_recv()
374 while (i < nfds) { in fd_recv()
375 if (PKG_MAX_SIZE < nfds - i) in fd_recv()
378 step = nfds - i; in fd_recv()
406 while (i < nfds) { in fd_send()
407 if (PKG_MAX_SIZE < nfds - i) in fd_send()
[all …]
H A Dmsgio.h44 int fd_send(int sock, const int *fds, size_t nfds);
45 int fd_recv(int sock, int *fds, size_t nfds);
/freebsd/contrib/ntp/sntp/libevent/
H A Dpoll.c126 for (i = 0; i < pop->nfds; ++i) { in poll_check_ok()
138 int res, i, j, nfds; in poll_dispatch() local
145 nfds = pop->nfds; in poll_dispatch()
165 sizeof(struct pollfd)*nfds); in poll_dispatch()
182 res = poll(event_set, nfds, msec); in poll_dispatch()
197 if (res == 0 || nfds == 0) in poll_dispatch()
201 for (j = 0; j < nfds; j++) { in poll_dispatch()
203 if (++i == nfds) in poll_dispatch()
269 i = pop->nfds++; in poll_add()
325 --pop->nfds; in poll_del()
[all …]
H A Dselect.c142 int res=0, i, j, nfds; in select_dispatch() local
168 nfds = sop->event_fds+1; in select_dispatch()
172 res = select(nfds, sop->event_readset_out, in select_dispatch()
191 i = evutil_weakrand_range_(&base->weakrand_seed, nfds); in select_dispatch()
192 for (j = 0; j < nfds; ++j) { in select_dispatch()
193 if (++i >= nfds) in select_dispatch()
/freebsd/contrib/libevent/
H A Dpoll.c126 for (i = 0; i < pop->nfds; ++i) { in poll_check_ok()
138 int res, i, j, nfds; in poll_dispatch() local
145 nfds = pop->nfds; in poll_dispatch()
165 sizeof(struct pollfd)*nfds); in poll_dispatch()
182 res = poll(event_set, nfds, msec); in poll_dispatch()
197 if (res == 0 || nfds == 0) in poll_dispatch()
201 for (j = 0; j < nfds; j++) { in poll_dispatch()
203 if (++i == nfds) in poll_dispatch()
269 i = pop->nfds++; in poll_add()
325 --pop->nfds; in poll_del()
[all …]
H A Dselect.c142 int res=0, i, j, nfds; in select_dispatch() local
168 nfds = sop->event_fds+1; in select_dispatch()
172 res = select(nfds, sop->event_readset_out, in select_dispatch()
191 i = evutil_weakrand_range_(&base->weakrand_seed, nfds); in select_dispatch()
192 for (j = 0; j < nfds; ++j) { in select_dispatch()
193 if (++i >= nfds) in select_dispatch()
/freebsd/tests/sys/kqueue/libkqueue/
H A Dmain.c30 int nfds; in _test_no_kevents() local
37 nfds = kevent(kqfd, NULL, 0, &kev, 1, &timeo); in _test_no_kevents()
38 if (nfds != 0) { in _test_no_kevents()
53 int nfds; in test_no_kevents_quietly() local
60 if (nfds != 0) { in test_no_kevents_quietly()
73 int nfds; in kevent_get() local
79 nfds = kevent(fd, NULL, 0, kev, 1, NULL); in kevent_get()
80 if (nfds < 1) in kevent_get()
90 int nfds; in kevent_get_timeout() local
98 if (nfds < 0) { in kevent_get_timeout()
[all …]
H A Dvnode.c152 int nfds; in test_kevent_vnode_note_attrib() local
163 nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL); in test_kevent_vnode_note_attrib()
164 if (nfds < 1) in test_kevent_vnode_note_attrib()
180 int nfds; in test_kevent_vnode_note_rename() local
191 nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL); in test_kevent_vnode_note_rename()
192 if (nfds < 1) in test_kevent_vnode_note_rename()
226 int nfds; in test_kevent_vnode_disable_and_enable() local
251 nfds = kevent(kqfd, NULL, 0, &kev, 1, NULL); in test_kevent_vnode_disable_and_enable()
252 if (nfds < 1) in test_kevent_vnode_disable_and_enable()
269 int nfds; in test_kevent_vnode_dispatch() local
[all …]
/freebsd/contrib/pf/libevent/
H A Dpoll.c61 int nfds; /* Size of event_* */ member
141 for (i = 0; i < pop->nfds; ++i) { in poll_check_ok()
153 int res, i, sec, nfds; in poll_dispatch() local
158 nfds = pop->nfds; in poll_dispatch()
159 res = poll(pop->event_set, nfds, sec); in poll_dispatch()
177 for (i = 0; i < nfds; i++) { in poll_dispatch()
227 if (pop->nfds + 1 >= pop->event_count) { in poll_add()
293 i = pop->nfds++; in poll_add()
355 --pop->nfds; in poll_del()
356 if (i != pop->nfds) { in poll_del()
[all …]
/freebsd/crypto/openssh/openbsd-compat/
H A Dbsd-poll.c46 ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *tmoutp, in ppoll() argument
53 for (i = 0; i < nfds; i++) { in ppoll()
66 for (i = 0; i < nfds; i++) { in ppoll()
81 for (i = 0; i < nfds; i++) { in ppoll()
100 poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument
111 return ppoll(fds, nfds, tsp, NULL); in poll()
H A Dbsd-pselect.c154 pselect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, in pselect() argument
168 return select(nfds, readfds, writefds, exceptfds, tvp); in pselect()
191 nfds = MAX(nfds, notify_pipe[0] + 1); in pselect()
196 ret = select(nfds, readfds, writefds, exceptfds, tvp); in pselect()
/freebsd/lib/libopenbsd/
H A Dgetdtablecount.c42 int nfds; in getdtablecount() local
45 len = sizeof(nfds); in getdtablecount()
51 error = sysctl(mib, 4, &nfds, &len, NULL, 0); in getdtablecount()
54 return (nfds); in getdtablecount()
/freebsd/tools/test/stress2/misc/
H A Doverflow3.sh50 int nfds, sv[2];
56 nfds = 253;
64 hdr.msg_control = calloc(1, CMSG_SPACE(nfds * sizeof(int)));
65 hdr.msg_controllen = CMSG_SPACE(nfds * sizeof(int));
68 chdr->cmsg_len = CMSG_LEN(nfds * sizeof(int));
/freebsd/lib/libpam/modules/pam_exec/
H A Dpam_exec.c172 nfds_t nfds, nreadfds; in _pam_exec() local
347 nfds = 1; in _pam_exec()
350 pfd[nfds].fd = chout[0]; in _pam_exec()
351 pfd[nfds].events = POLLIN|POLLERR|POLLHUP; in _pam_exec()
352 nfds++; in _pam_exec()
356 pfd[nfds].fd = cherr[0]; in _pam_exec()
358 nfds++; in _pam_exec()
362 pfd[nfds].fd = chin[1]; in _pam_exec()
364 nfds++; in _pam_exec()
369 if (poll(pfd, nfds, INFTIM) < 0) { in _pam_exec()
[all …]
/freebsd/usr.sbin/ppp/
H A Dmain.c543 int i, nfds, nothing_done; in DoLoop() local
564 nfds = 0; in DoLoop()
570 descriptor_UpdateSet(&bundle->desc, rfds, wfds, efds, &nfds); in DoLoop()
573 descriptor_UpdateSet(&server.desc, rfds, NULL, NULL, &nfds); in DoLoop()
591 i = select(nfds, rfds, wfds, efds, NULL); in DoLoop()
598 for (i = 0; i <= nfds; i++) { in DoLoop()
603 if (select(nfds, rfds, wfds, efds, &t) != -1) { in DoLoop()
612 if (select(nfds, rfds, wfds, efds, &t) != -1) { in DoLoop()
621 if (select(nfds, rfds, wfds, efds, &t) != -1) { in DoLoop()
638 for (i = 0; i <= nfds; i++) in DoLoop()
[all …]
/freebsd/usr.bin/ident/
H A Dident.c217 size_t nfds; in main() local
241 nfds = 1; in main()
247 nfds = argc; in main()
248 fds = malloc(sizeof(*fds) * nfds); in main()
270 for (i = 0; i < (int)nfds; i++) { in main()
/freebsd/tests/sys/kern/
H A Dunix_passfd_test.c137 putfds(char *buf, int fd, int nfds) in putfds() argument
452 int fd[2], nfds; in ATF_TC_BODY() local
476 nfds = getnfds(); in ATF_TC_BODY()
492 ATF_REQUIRE(getnfds() == nfds); in ATF_TC_BODY()
746 int fd[2], nfds, putfd, rc; in ATF_TC_BODY() local
750 nfds = getnfds(); in ATF_TC_BODY()
760 ATF_REQUIRE(getnfds() == nfds); in ATF_TC_BODY()
776 ATF_REQUIRE(getnfds() == nfds); in ATF_TC_BODY()
789 ATF_REQUIRE(getnfds() == nfds); in ATF_TC_BODY()
837 int fd[2], error, nfds, putfd; in ATF_TC_BODY() local
[all …]
/freebsd/contrib/ofed/librdmacm/
H A Dpreload.c870 if (nfds > rnfds) { in fds_alloc()
874 rfds = malloc(sizeof(*rfds) * nfds); in fds_alloc()
875 rnfds = rfds ? nfds : 0; in fds_alloc()
887 for (i = 0; i < nfds; i++) { in poll()
895 rfds = fds_alloc(nfds); in poll()
899 for (i = 0; i < nfds; i++) { in poll()
905 ret = rpoll(rfds, nfds, timeout); in poll()
907 for (i = 0; i < nfds; i++) in poll()
918 for (fd = 0; fd < *nfds; fd++) { in select_to_rpoll()
929 *nfds = i; in select_to_rpoll()
[all …]
/freebsd/lib/libc/gen/
H A Dftw-compat11.c34 const struct freebsd11_stat *, int), int nfds);
38 int (*fn)(const char *, const struct freebsd11_stat *, int), int nfds) in freebsd11_ftw() argument
46 if (nfds < 1) { in freebsd11_ftw()
H A Dftw.c31 int nfds) in ftw() argument
39 if (nfds < 1) { in ftw()
/freebsd/contrib/llvm-project/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()
/freebsd/lib/libc/sys/
H A Dpoll.c40 poll(struct pollfd pfd[], nfds_t nfds, int timeout) in poll() argument
42 return (INTERPOS_SYS(poll, pfd, nfds, timeout)); in poll()
H A Dppoll.c40 ppoll(struct pollfd pfd[], nfds_t nfds, const struct timespec *__restrict in ppoll() argument
43 return (INTERPOS_SYS(ppoll, pfd, nfds, timeout, newsigmask)); in ppoll()
/freebsd/sys/contrib/libnv/
H A Dnvpair_impl.h99 const unsigned char *ptr, size_t *leftp, size_t nfds, nvlist_t **child);
101 const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds);
111 const unsigned char *ptr, size_t *leftp, const int *fds, size_t nfds);
/freebsd/sbin/nos-tun/
H A Dnos-tun.c258 int nfds; /* Return from select() */ in main() local
352 nfds = select(lastfd+1,&rfds,NULL,NULL,NULL); in main()
353 if(nfds < 0) { in main()
358 if(nfds == 0) { /* Impossible ? */ in main()

1234