Debian Codegraph @

madrisan-nagios-plugins-linux/nagios-plugins-linux/include/cpufreq.h

raw symbols SCIP
1 // SPDX-License-Identifier: GPL-3.0-or-later
2 /* cpufreq.h -- a library for checking the CPU frequency configuration
3
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation, either version 3 of the License, or
7 (at your option) any later version.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
16
17 #ifndef _CPUFREQ_H
18 #define _CPUFREQ_H
19
20 struct cpufreq_available_frequencies;
21
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26
27 int cpufreq_get_hardware_limits (unsigned int cpu,
28 unsigned long *min, unsigned long *max);
29 unsigned long cpufreq_get_transition_latency (unsigned int cpu);
30 unsigned long cpufreq_get_freq_kernel (unsigned int cpu);
31
32 struct cpufreq_available_frequencies *
33 cpufreq_get_available_freqs (unsigned int cpu);
34 struct cpufreq_available_frequencies *
35 cpufreq_get_available_freqs_next (
36 struct cpufreq_available_frequencies *curr);
37 unsigned long cpufreq_get_available_freqs_value (
38 struct cpufreq_available_frequencies *curr);
39 void cpufreq_available_frequencies_unref(
40 struct cpufreq_available_frequencies *first);
41
42 char *cpufreq_get_driver (unsigned int cpu);
43 char *cpufreq_get_governor (unsigned int cpu);
44 char *cpufreq_get_available_governors (unsigned int cpu);
45
46 char *cpufreq_freq_to_string (unsigned long freq);
47 char *cpufreq_duration_to_string (unsigned long duration);
48
49 #ifdef __cplusplus
50 }
51 #endif
52
53 #endif /* _CPUFREQ_H */