fd_nfiles
last = min(fdp->fd_nfiles, lim);
if (fdp->fd_nfiles < lim)
freefd += (lim - fdp->fd_nfiles);
if (i >= fdp->fd_nfiles + 2) {
if (fd < 0 || fd >= fdp->fd_nfiles ||
if (new >= fdp->fd_nfiles) {
nfd1 = fdp->fd_nfiles * 2;
KASSERT(fdp->fd_nfiles > 0, ("zero-length file table"));
onfiles = fdp->fd_nfiles;
fd = fd_first_free(fdp, minfd, fdp->fd_nfiles);
if (__predict_false(fd >= fdp->fd_nfiles)) {
KASSERT(fd >= 0 && fd < min(maxfd, fdp->fd_nfiles),
off = NDSLOT(fdp->fd_nfiles - 1);
if (lastfile < newfdp->fd_nfiles)
KASSERT(fd >= 0 && fd < fdp->fd_nfiles,
("file descriptor %d out of range (0, %d)", fd, fdp->fd_nfiles));
if (NDSLOTS(fdp->fd_nfiles) > NDSLOTS(NDFILE))
if (fdp->fd_nfiles > NDFILE)
MPASS(fdp->fd_nfiles >= 3);
MPASS(fdp->fd_nfiles >= 3);
if (__predict_false(fd >= fdp->fd_nfiles))
if (__predict_false(fd >= fdp->fd_nfiles))
off = NDSLOT(fdp->fd_nfiles - 1);
n += fdp->fd_nfiles;
for (n = 0; n < fdp->fd_nfiles; n++) {
for (n = 0; n < fdp->fd_nfiles; ++n) {
KASSERT(fd >= 0 && fd < fdp->fd_nfiles,
KASSERT(fd >= 0 && fd < fdp->fd_nfiles,
lf = fdp->fd_nfiles;
for (i = 0; i < fdp->fd_nfiles; ++i) {
(u_int)fd >= (u_int)atomic_load_int(&fdp->fd_nfiles)))
if (__predict_false((u_int)fd >= (u_int)fdp->fd_nfiles))
if (__predict_false((u_int)fd >= (u_int)fdp->fd_nfiles))