cpudeadline.h 702 B

123456789101112131415161718192021222324252627282930313233
  1. #ifndef _LINUX_CPUDL_H
  2. #define _LINUX_CPUDL_H
  3. #include <linux/sched.h>
  4. #include <linux/sched/deadline.h>
  5. #define IDX_INVALID -1
  6. struct cpudl_item {
  7. u64 dl;
  8. int cpu;
  9. int idx;
  10. };
  11. struct cpudl {
  12. raw_spinlock_t lock;
  13. int size;
  14. cpumask_var_t free_cpus;
  15. struct cpudl_item *elements;
  16. };
  17. #ifdef CONFIG_SMP
  18. int cpudl_find(struct cpudl *cp, struct task_struct *p,
  19. struct cpumask *later_mask);
  20. void cpudl_set(struct cpudl *cp, int cpu, u64 dl, int is_valid);
  21. int cpudl_init(struct cpudl *cp);
  22. void cpudl_set_freecpu(struct cpudl *cp, int cpu);
  23. void cpudl_clear_freecpu(struct cpudl *cp, int cpu);
  24. void cpudl_cleanup(struct cpudl *cp);
  25. #endif /* CONFIG_SMP */
  26. #endif /* _LINUX_CPUDL_H */