Lines Matching refs:state
30 if (fd >= 0 && fd < elementsof(state.file))
39 if (state.file[fd].dir)
41 free(state.file[fd].dir);
42 state.file[fd].dir = 0;
45 if (rp = state.file[fd].reserved)
53 state.file[nfd].reserved = rp;
54 state.file[nfd].flags = FILE_LOCK;
55 state.file[fd].reserved = 0;
59 if ((mp = state.file[fd].mount) && fssys(mp, MSG_close))
61 if (FSTAT(fd, &state.path.st))
62 state.path.st.st_mtime = 0;
63 fscall(mp, MSG_close, 0, fd, state.path.st.st_mtime);
65 for (mp = state.global; mp; mp = mp->global)
68 if ((state.file[fd].flags & FILE_OPEN) ? FSTAT(fd, &state.path.st) : fileinit(fd, NiL, NiL, 0))
69 state.path.st.st_mtime = 0;
70 fscall(mp, MSG_close, 0, fd, state.path.st.st_mtime);
72 if (state.file[fd].flags)
74 state.file[fd].flags = 0;
75 state.file[fd].mount = 0;
76 if (state.cache == fd)
77 while (state.cache > 1 && !state.file[--state.cache].flags);