cpupri.h 674 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef _LINUX_CPUPRI_H
  2. #define _LINUX_CPUPRI_H
  3. #include <linux/sched.h>
  4. #define CPUPRI_NR_PRIORITIES (MAX_RT_PRIO + 2)
  5. #define CPUPRI_INVALID -1
  6. #define CPUPRI_IDLE 0
  7. #define CPUPRI_NORMAL 1
  8. /* values 2-101 are RT priorities 0-99 */
  9. struct cpupri_vec {
  10. atomic_t count;
  11. cpumask_var_t mask;
  12. };
  13. struct cpupri {
  14. struct cpupri_vec pri_to_cpu[CPUPRI_NR_PRIORITIES];
  15. int *cpu_to_pri;
  16. };
  17. #ifdef CONFIG_SMP
  18. int cpupri_find(struct cpupri *cp,
  19. struct task_struct *p, struct cpumask *lowest_mask);
  20. void cpupri_set(struct cpupri *cp, int cpu, int pri);
  21. int cpupri_init(struct cpupri *cp);
  22. void cpupri_cleanup(struct cpupri *cp);
  23. #endif
  24. #endif /* _LINUX_CPUPRI_H */