Lines Matching refs:fp
110 FILE *fp;
119 fp = file_util::CreateAndOpenTemporaryShmemFile(&path);
124 if (fp)
131 fp = file_util::OpenFile(path, "w+x");
132 if (fp == NULL && open_existing) {
134 fp = file_util::OpenFile(path, "a+");
138 if (fp && fix_size) {
141 if (fstat(fileno(fp), &stat) != 0)
145 if (HANDLE_EINTR(ftruncate(fileno(fp), size)) != 0)
147 if (fseeko(fp, size, SEEK_SET) != 0)
152 if (fp == NULL) {
169 return PrepareMapFile(fp);
196 FILE *fp = file_util::OpenFile(path, mode);
197 return PrepareMapFile(fp);
251 bool SharedMemory::PrepareMapFile(FILE *fp) {
253 if (fp == NULL) return false;
260 file_util::ScopedFILE file_closer(fp);
262 mapped_file_ = dup(fileno(fp));