specs.h 697 B

12345678910111213141516171819202122232425262728
  1. /*
  2. Platform-specific definitions for the program
  3. */
  4. #include <string.h>
  5. #include <stdlib.h>
  6. #ifndef _SPECS_H
  7. #define _SPECS_H
  8. // change these if your cpu stats file is elsewhere:
  9. #define CPU_CUR_FILE "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq"
  10. #define CPU_MAX_FILE "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq"
  11. #define CPU_MIN_FILE "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_min_freq"
  12. // the contents in those files reeeeally shouldn't be more than this.
  13. // units in the above files are expressed in kHz, for example.
  14. #define CPU_FILE_BUFF 20
  15. // query commands
  16. #define QUERY_COMMAND "cpupower frequency-set --max %ld --governor performance > /dev/null"
  17. #endif