tools/power/cpupower/utils/helpers/sysfs.h
Source file repositories/reference/linux-study-clean/tools/power/cpupower/utils/helpers/sysfs.h
File Facts
- System
- Linux kernel
- Corpus path
tools/power/cpupower/utils/helpers/sysfs.h- Extension
.h- Size
- 1440 bytes
- Lines
- 40
- Domain
- Support Tooling And Documentation
- Bucket
- tools
- Inferred role
- Support Tooling And Documentation: implementation source
- Status
- source implementation candidate
Why This File Exists
Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
- Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.
Dependency Surface
- No C-style include directives detected by the generator.
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
#ifndef __CPUPOWER_HELPERS_SYSFS_H__
#define __CPUPOWER_HELPERS_SYSFS_H__
#define PATH_TO_CPU "/sys/devices/system/cpu/"
#define MAX_LINE_LEN 255
#define SYSFS_PATH_MAX 255
extern unsigned int sysfs_read_file(const char *path, char *buf, size_t buflen);
extern unsigned int sysfs_idlestate_file_exists(unsigned int cpu,
unsigned int idlestate,
const char *fname);
extern int sysfs_is_cpu_online(unsigned int cpu);
extern int sysfs_is_idlestate_disabled(unsigned int cpu,
unsigned int idlestate);
extern int sysfs_idlestate_disable(unsigned int cpu, unsigned int idlestate,
unsigned int disable);
extern unsigned long sysfs_get_idlestate_latency(unsigned int cpu,
unsigned int idlestate);
extern unsigned long sysfs_get_idlestate_usage(unsigned int cpu,
unsigned int idlestate);
extern unsigned long long sysfs_get_idlestate_time(unsigned int cpu,
unsigned int idlestate);
extern char *sysfs_get_idlestate_name(unsigned int cpu,
unsigned int idlestate);
extern char *sysfs_get_idlestate_desc(unsigned int cpu,
unsigned int idlestate);
extern unsigned int sysfs_get_idlestate_count(unsigned int cpu);
extern char *sysfs_get_cpuidle_governor(void);
extern char *sysfs_get_cpuidle_driver(void);
extern int sysfs_get_sched(const char *smt_mc);
extern int sysfs_set_sched(const char *smt_mc, int val);
#endif /* __CPUPOWER_HELPERS_SYSFS_H__ */
Annotation
- Atlas domain: Support Tooling And Documentation / tools.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.