cpudeadline.h 733 B

1234567891011121314151617181920212223242526272829303132333435
  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);
  21. void cpudl_clear(struct cpudl *cp, int cpu);
  22. int cpudl_init(struct cpudl *cp);
  23. void cpudl_set_freecpu(struct cpudl *cp, int cpu);
  24. void cpudl_clear_freecpu(struct cpudl *cp, int cpu);
  25. void cpudl_cleanup(struct cpudl *cp);
  26. #endif /* CONFIG_SMP */
  27. #endif /* _LINUX_CPUDL_H */