Lines Matching refs:proc_stat_fd
52 static int proc_stat_fd = -1; variable
63 proc_stat_fd, in cpu_util_init()
67 if (proc_stat_fd < 0) { in cpu_util_init()
68 proc_stat_fd = open (PROC_STAT_FILE_NAME, O_RDONLY, NULL); in cpu_util_init()
69 if (proc_stat_fd < 0) { in cpu_util_init()
98 close(proc_stat_fd); in cpu_util_terminate()
99 proc_stat_fd = -1; in cpu_util_terminate()
114 if (proc_stat_fd < 0) { in calibrate_idle_rate()
115 proc_stat_fd = open (PROC_STAT_FILE_NAME, O_RDONLY, NULL); in calibrate_idle_rate()
116 if (proc_stat_fd < 0) { in calibrate_idle_rate()
151 lseek (proc_stat_fd, 0, SEEK_SET); in get_cpu_idle()
152 read (proc_stat_fd, p, proc_stat_buflen); in get_cpu_idle()