diff options
| author | Rafaël Carré <rafael.carre@gmail.com> | 2012-01-04 00:34:02 +0000 |
|---|---|---|
| committer | Rafaël Carré <rafael.carre@gmail.com> | 2012-01-04 00:34:02 +0000 |
| commit | 925dacf96dca1ca09c58024df2e41aaea524c722 (patch) | |
| tree | 361dfcdda7d2b095b70b46401c1d3b507cf93261 /firmware/target/hosted/cpuinfo-linux.h | |
| parent | d07c1d57a4c54c5154036192a563a4a4fcaa6eac (diff) | |
| download | rockbox-925dacf96dca1ca09c58024df2e41aaea524c722.zip rockbox-925dacf96dca1ca09c58024df2e41aaea524c722.tar.gz rockbox-925dacf96dca1ca09c58024df2e41aaea524c722.tar.bz2 rockbox-925dacf96dca1ca09c58024df2e41aaea524c722.tar.xz | |
*frequency_linux(): factorize
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31555 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/hosted/cpuinfo-linux.h')
| -rw-r--r-- | firmware/target/hosted/cpuinfo-linux.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/firmware/target/hosted/cpuinfo-linux.h b/firmware/target/hosted/cpuinfo-linux.h index d9ba376..ebc05d5 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 <stdbool.h> + 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); |