Lines Matching defs:fds
236 sel_do_scan(const char *opname, void *fds, const int nf, const size_t ni,
264 l->l_selbits = fds;
293 error = selscan((char *)fds, nf, ni, retval);
295 error = pollscan((struct pollfd *)fds, nf, retval);
395 * Don't allow absurdly large numbers of fds to be selected.
400 * include all the possible fds, as fd_sets are always
404 * set lower after some fds were opened, we always allow selecting
433 nd -= fb * NFDBITS; /* the number of excess fds */
435 #define checkbits(name, o, sz, fds) \
442 if (anyset(bits, (fds) ? \
443 (size_t)(fds) : CHAR_BIT * (sz))) { \
464 db = fb; /* now just check the plausible fds */
577 syscallarg(struct pollfd *) fds;
589 return pollcommon(retval, SCARG(uap, fds), SCARG(uap, nfds), ts, NULL);
600 syscallarg(struct pollfd *) fds;
622 return pollcommon(retval, SCARG(uap, fds), SCARG(uap, nfds), ts, mask);
630 struct pollfd *fds;
642 * process the 'fds' array in chunks, but that
646 * Historically the code silently truncated 'fds' to
661 fds = kmem_alloc(ni, KM_SLEEP);
663 fds = smallfds;
665 error = copyin(u_fds, fds, ni);
669 error = sel_do_scan(selop_poll, fds, nfds, ni, ts, mask, retval);
671 error = copyout(fds, u_fds, ni);
673 if (fds != smallfds)
674 kmem_free(fds, ni);
679 pollscan(struct pollfd *fds, const int nfd, register_t *retval)
684 for (i = 0; i < nfd; i++, fds++) {
685 fds->revents = 0;
686 if (fds->fd < 0) {
688 } else if ((fp = fd_getfile(fds->fd)) == NULL) {
696 curlwp->l_selrec = (uintptr_t)fds;
698 fds->events | POLLERR | POLLHUP);
699 fd_putfile(fds->fd);
706 fds->revents = revents;
829 fd_mask *fds = (fd_mask *)l->l_selbits;
830 fd_mask *ofds = (fd_mask *)((char *)fds + ni * 3);
836 if ((fds[idx] & fbit) != 0 &&
842 fds = (fd_mask *)((char *)fds + ni);