deadline.h 435 B

123456789101112131415161718192021222324
  1. #ifndef _SCHED_DEADLINE_H
  2. #define _SCHED_DEADLINE_H
  3. /*
  4. * SCHED_DEADLINE tasks has negative priorities, reflecting
  5. * the fact that any of them has higher prio than RT and
  6. * NORMAL/BATCH tasks.
  7. */
  8. #define MAX_DL_PRIO 0
  9. static inline int dl_prio(int prio)
  10. {
  11. if (unlikely(prio < MAX_DL_PRIO))
  12. return 1;
  13. return 0;
  14. }
  15. static inline int dl_task(struct task_struct *p)
  16. {
  17. return dl_prio(p->prio);
  18. }
  19. #endif /* _SCHED_DEADLINE_H */