aboutsummaryrefslogtreecommitdiff
path: root/utils.h
diff options
context:
space:
mode:
authorShaojie Sun <shaojie.sun@linaro.org>2013-09-10 18:34:04 +0800
committerDaniel Lezcano <daniel.lezcano@linaro.org>2013-09-10 12:42:00 +0200
commit5d4997b17d8e88d45ef2b5fd0a5a74024af34298 (patch)
treec55acb26d00d9917aeffc7b1b96341b24a865824 /utils.h
parent9d693819af2d1e2dcd22f8e4fde5f1e6f245e7ca (diff)
Add cpu topology info
We read cpu top[ology info from /sys/devices/system/cpuX/topology. Packed them into cpu_topology struct. And print in next format. clusterA: coreX cpuA cpuB coreY cpuC cpuD clusterB: coreS cpuE cpuF coreT cpuG cpuH ... When cpu topology info could be read, CPU idle state is shown ordered by topology. When cpu topology info could not be read, CPU idle state is shown in old order. Signed-off-by: Shaojie Sun <shaojie.sun@linaro.com> Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Diffstat (limited to 'utils.h')
-rw-r--r--utils.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils.h b/utils.h
index 950cf26..acd226a 100644
--- a/utils.h
+++ b/utils.h
@@ -5,5 +5,7 @@
extern int write_int(const char *path, int val);
extern int read_int(const char *path, int *val);
extern int store_line(const char *line, void *data);
+extern int file_read_value(const char *path, const char *name,
+ const char *format, void *value);
#endif