/freebsd/lib/libnv/ |
H A D | msgio.c | 223 fd_package_send(int sock, const int *fds, size_t nfds) in fd_package_send() argument 234 PJDLOG_ASSERT(nfds > 0); in fd_package_send() 247 msg.msg_controllen = nfds * CMSG_SPACE(sizeof(int)); in fd_package_send() 254 for (i = 0, cmsg = CMSG_FIRSTHDR(&msg); i < nfds && cmsg != NULL; in fd_package_send() 272 fd_package_recv(int sock, int *fds, size_t nfds) in fd_package_recv() argument 282 PJDLOG_ASSERT(nfds > 0); in fd_package_recv() 296 msg.msg_controllen = nfds * CMSG_SPACE(sizeof(int)); in fd_package_recv() 308 while (cmsg && i < nfds) { in fd_package_recv() 317 if (i + n > nfds) { in fd_package_recv() 326 if (cmsg != NULL || i < nfds) { in fd_package_recv() [all …]
|
H A D | msgio.h | 44 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 D | poll.c | 73 int nfds; /* Highest number used */ member 126 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() 200 i = evutil_weakrand_range_(&base->weakrand_seed, nfds); in poll_dispatch() 201 for (j = 0; j < nfds; j++) { in poll_dispatch() 203 if (++i == nfds) in poll_dispatch() [all …]
|
H A D | select.c | 142 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 D | poll.c | 73 int nfds; /* Highest number used */ member 126 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() 200 i = evutil_weakrand_range_(&base->weakrand_seed, nfds); in poll_dispatch() 201 for (j = 0; j < nfds; j++) { in poll_dispatch() 203 if (++i == nfds) in poll_dispatch() [all …]
|
H A D | select.c | 142 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/kern/ |
H A D | unix_stream.c | 108 int nfds, kq; in check_writable() local 112 nfds = select(fd + 1, NULL, &wrfds, NULL, in check_writable() 114 ATF_REQUIRE_MSG(nfds == expect, in check_writable() 115 "select() returns %d errno %d", nfds, errno); in check_writable() 121 nfds = poll(pfd, 1, 1); in check_writable() 122 ATF_REQUIRE_MSG(nfds == expect, in check_writable() 123 "poll() returns %d errno %d", nfds, errno); in check_writable() 128 nfds = kevent(kq, NULL, 0, &kev, 1, in check_writable() 130 ATF_REQUIRE_MSG(nfds == expect, in check_writable() 131 "kevent() returns %d errno %d", nfds, errno); in check_writable()
|
H A D | unix_passfd_test.c | 137 putfds(char *buf, int fd, int nfds) in putfds() argument 143 cm->cmsg_len = CMSG_LEN(nfds * sizeof(int)); in putfds() 146 for (fdp = (int *)CMSG_DATA(cm), i = 0; i < nfds; i++) in putfds() 452 int fd[2], nfds; in ATF_TC_BODY() local 476 nfds = getnfds(); in ATF_TC_BODY() 478 ATF_REQUIRE(getnfds() == (int)(nfds + MAXFDS)); in ATF_TC_BODY() 482 nfds = rlim.rlim_cur = 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() [all …]
|
/freebsd/tests/sys/kqueue/libkqueue/ |
H A D | main.c | 30 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() 43 errx(1, "%d event(s) pending, but none expected:", nfds); in _test_no_kevents() 53 int nfds; in test_no_kevents_quietly() local 59 nfds = kevent(kqfd, NULL, 0, &kev, 1, &timeo); in test_no_kevents_quietly() 60 if (nfds != 0) { in test_no_kevents_quietly() 65 errx(1, "%d event(s) pending, but none expected:", nfds); in test_no_kevents_quietly() 73 int nfds; in kevent_get() local 79 nfds = kevent(fd, NULL, 0, kev, 1, NULL); in kevent_get() [all …]
|
H A D | vnode.c | 152 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/include/ssp/ |
H A D | poll.h | 37 (struct pollfd fds[], nfds_t nfds, int timeout)) 39 if (__ssp_bos(fds) / sizeof(fds[0]) < nfds) 42 return (__ssp_real(poll)(fds, nfds, timeout)); 47 (struct pollfd fds[], nfds_t nfds, 51 if (__ssp_bos(fds) / sizeof(fds[0]) < nfds) 54 return (__ssp_real(ppoll)(fds, nfds, timeout, newsigmask));
|
/freebsd/contrib/pf/libevent/ |
H A D | poll.c | 61 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 D | bsd-poll.c | 46 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 D | bsd-pselect.c | 154 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 D | getdtablecount.c | 42 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 D | overflow3.sh | 50 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 D | pam_exec.c | 172 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() 357 pfd[nfds].events = POLLIN|POLLERR|POLLHUP; in _pam_exec() 358 nfds++; in _pam_exec() 362 pfd[nfds].fd = chin[1]; in _pam_exec() 363 pfd[nfds].events = POLLOUT|POLLERR|POLLHUP; in _pam_exec() [all …]
|
/freebsd/usr.sbin/ppp/ |
H A D | main.c | 543 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 D | ident.c | 217 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/contrib/ofed/librdmacm/ |
H A D | preload.c | 78 int (*poll)(struct pollfd *fds, nfds_t nfds, int timeout); 865 static struct pollfd *fds_alloc(nfds_t nfds) in fds_alloc() argument 870 if (nfds > rnfds) { in fds_alloc() 874 rfds = malloc(sizeof(*rfds) * nfds); in fds_alloc() 875 rnfds = rfds ? nfds : 0; in fds_alloc() 881 int poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument 887 for (i = 0; i < nfds; i++) { in poll() 892 return real.poll(fds, nfds, timeout); in poll() 895 rfds = fds_alloc(nfds); in poll() 899 for (i = 0; i < nfds; i++) { in poll() [all …]
|
/freebsd/lib/libc/gen/ |
H A D | ftw-compat11.c | 34 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()
|
/freebsd/contrib/llvm-project/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()
|
/freebsd/lib/libc/sys/ |
H A D | poll.c | 40 __ssp_real(poll)(struct pollfd pfd[], nfds_t nfds, int timeout) in __ssp_real() 42 return (INTERPOS_SYS(poll, pfd, nfds, timeout)); in __ssp_real()
|
H A D | ppoll.c | 40 __ssp_real(ppoll)(struct pollfd pfd[], nfds_t nfds, in __ssp_real() 44 return (INTERPOS_SYS(ppoll, pfd, nfds, timeout, newsigmask)); in __ssp_real()
|
/freebsd/sys/contrib/libnv/ |
H A D | nvpair_impl.h | 99 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);
|