Lines Matching refs:state_fd
314 THREAD_LOCAL int state_fd = -2; in get_clock() local
323 if (state_fd == -2) { in get_clock()
325 state_fd = open("/var/lib/libuuid/clock.txt", in get_clock()
328 state_f = fdopen(state_fd, "r+"); in get_clock()
330 close(state_fd); in get_clock()
331 state_fd = -1; in get_clock()
339 if (state_fd >= 0) { in get_clock()
341 while (fcntl(state_fd, F_SETLKW, &fl) < 0) { in get_clock()
345 close(state_fd); in get_clock()
346 state_fd = -1; in get_clock()
350 if (state_fd >= 0) { in get_clock()
401 if (state_fd > 0) { in get_clock()
408 if (ftruncate(state_fd, len) < 0) { in get_clock()
414 fcntl(state_fd, F_SETLK, &fl); in get_clock()