Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
sysfs.h
Go to the documentation of this file.
1 #ifndef __CPUPOWER_HELPERS_SYSFS_H__
2 #define __CPUPOWER_HELPERS_SYSFS_H__
3 
4 #define PATH_TO_CPU "/sys/devices/system/cpu/"
5 #define MAX_LINE_LEN 255
6 #define SYSFS_PATH_MAX 255
7 
8 extern unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen);
9 
10 extern int sysfs_is_cpu_online(unsigned int cpu);
11 
12 extern unsigned long sysfs_get_idlestate_latency(unsigned int cpu,
13  unsigned int idlestate);
14 extern unsigned long sysfs_get_idlestate_usage(unsigned int cpu,
15  unsigned int idlestate);
16 extern unsigned long long sysfs_get_idlestate_time(unsigned int cpu,
17  unsigned int idlestate);
18 extern char *sysfs_get_idlestate_name(unsigned int cpu,
19  unsigned int idlestate);
20 extern char *sysfs_get_idlestate_desc(unsigned int cpu,
21  unsigned int idlestate);
22 extern int sysfs_get_idlestate_count(unsigned int cpu);
23 
24 extern char *sysfs_get_cpuidle_governor(void);
25 extern char *sysfs_get_cpuidle_driver(void);
26 
27 extern int sysfs_get_sched(const char *smt_mc);
28 extern int sysfs_set_sched(const char *smt_mc, int val);
29 
30 #endif /* __CPUPOWER_HELPERS_SYSFS_H__ */