cpu.h 534 B

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