Lines Matching refs:fp
299 FILE *fp; in UpdatePowerStateLog() local
302 fp = fopen(POWER_TRACKER_LOG_FILE.c_str(), "w"); in UpdatePowerStateLog()
303 if (fp == NULL) { in UpdatePowerStateLog()
329 if (!TryLockFile(fp)) { in UpdatePowerStateLog()
332 fclose(fp); in UpdatePowerStateLog()
335 fwrite(PwrInfo.c_str(), sizeof(char), PwrInfo.length(), fp); in UpdatePowerStateLog()
336 fflush(fp); in UpdatePowerStateLog()
337 UnlockFile(fp); in UpdatePowerStateLog()
338 fclose(fp); in UpdatePowerStateLog()
419 bool NfccPowerTracker::TryLockFile(FILE *fp) { in TryLockFile() argument
422 if (!flock(fileno(fp), LOCK_EX | LOCK_NB)) in TryLockFile()
438 void NfccPowerTracker::UnlockFile(FILE *fp) { flock(fileno(fp), LOCK_UN); } in UnlockFile() argument