cpudeadline.h 668 B

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