From 925dacf96dca1ca09c58024df2e41aaea524c722 Mon Sep 17 00:00:00 2001 From: Rafaël Carré Date: Wed, 4 Jan 2012 00:34:02 +0000 Subject: *frequency_linux(): factorize git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31555 a1c6a512-1295-4272-9138-f99709370657 --- firmware/target/hosted/cpuinfo-linux.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'firmware/target/hosted/cpuinfo-linux.h') diff --git a/firmware/target/hosted/cpuinfo-linux.h b/firmware/target/hosted/cpuinfo-linux.h index d9ba376f49..ebc05d5c43 100644 --- a/firmware/target/hosted/cpuinfo-linux.h +++ b/firmware/target/hosted/cpuinfo-linux.h @@ -1,10 +1,10 @@ /*************************************************************************** - * __________ __ ___. - * Open \______ \ ____ ____ | | _\_ |__ _______ ___ - * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / - * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < - * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ - * \/ \/ \/ \/ \/ + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ * $Id$ * * Copyright (C) 2011 Thomas Martitz @@ -23,6 +23,8 @@ #ifndef __CPUINFO_LINUX_H__ #define __CPUINFO_LINUX_H__ +#include + struct cpuusage { long usage; /* in hundredth percent */ long utime; /* in clock ticks */ @@ -37,8 +39,7 @@ struct time_state { }; int cpuusage_linux(struct cpuusage* u); -int cpufrequency_linux(int cpu); -int scalingfrequency_linux(int cpu); +int frequency_linux(int cpu, bool scaling); int cpustatetimes_linux(int cpu, struct time_state* data, int max_elements); int cpucount_linux(void); -- cgit v1.2.3