Lines Matching defs:fd
275 int fd = open(full_name.c_str(), O_RDWR);
276 if (fd < 0) {
284 int err = flock(fd, LOCK_EX);
291 profile_table_.ReadPrevious(fd, options_.GetProfileType());
294 lseek(fd, 0, SEEK_SET);
304 int n = ::write(fd, p, length);
310 ftruncate(fd, full_length);
313 err = flock(fd, LOCK_UN);
319 ::close(fd);
721 static bool ReadProfileLine(int fd, std::string& line) {
725 int n = read(fd, buf, 1); // TODO: could speed this up but is it worth it?
737 void ProfileSampleResults::ReadPrevious(int fd, ProfileDataType type) {
744 if (!ReadProfileLine(fd, line)) {
759 if (!ReadProfileLine(fd, line)) {