Lines Matching refs:state_fd
310 THREAD_LOCAL int state_fd = -2;
319 if (state_fd == -2) {
321 state_fd = open("/var/lib/libuuid/clock.txt",
324 state_f = fdopen(state_fd, "r+");
326 close(state_fd);
327 state_fd = -1;
335 if (state_fd >= 0) {
337 while (fcntl(state_fd, F_SETLKW, &fl) < 0) {
341 close(state_fd);
342 state_fd = -1;
346 if (state_fd >= 0) {
397 if (state_fd > 0) {
403 if (ftruncate(state_fd, len) < 0) {
409 fcntl(state_fd, F_SETLK, &fl);