cpu.h 492 B

12345678910111213141516171819202122
  1. #ifndef _cpu_h
  2. #define _cpu_h
  3. struct cpu_s {
  4. unsigned int id; /* Logical processor ID */
  5. unsigned int package_id;
  6. unsigned int core_id;
  7. };
  8. typedef struct cpu_s cpu_t;
  9. #define SYSFS_CPU_PATH "/sys/devices/system/cpu"
  10. /* CPU IDs compare function */
  11. int cpu_list_compare(const void *first, const void *second);
  12. /* CPU list functions */
  13. int cpu_list_populate(lub_list_t *cpus);
  14. int cpu_list_free(lub_list_t *cpus);
  15. int scan_cpus(lub_list_t *cpus);
  16. int show_cpus(lub_list_t *cpus);
  17. #endif