Since statinary kernel sysfs or procfs nodes is not have to be
read every time, it lets them being read once.
Change-Id: Icee5f825694867ecb84847fd46830274fe8219d3
Signed-off-by: Dongwoo Lee <dwoo08.lee@samsung.com>
int kernel_get_possible_cpu_num(void)
{
- return __get_cpu_num("/sys/devices/system/cpu/possible");
+ static int possible = 0;
+
+ if (!possible)
+ possible = __get_cpu_num("/sys/devices/system/cpu/possible");
+
+ return possible;
}
int kernel_get_total_cpu_stat(struct cpu_stat *total)