Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1#ifndef _LINUX_SCHED_DEADLINE_H
2#define _LINUX_SCHED_DEADLINE_H
3
4#include <linux/sched.h>
5
6/*
7 * SCHED_DEADLINE tasks has negative priorities, reflecting
8 * the fact that any of them has higher prio than RT and
9 * NORMAL/BATCH tasks.
10 */
11
12#define MAX_DL_PRIO 0
13
14static inline int dl_prio(int prio)
15{
16 if (unlikely(prio < MAX_DL_PRIO))
17 return 1;
18 return 0;
19}
20
21static inline int dl_task(struct task_struct *p)
22{
23 return dl_prio(p->prio);
24}
25
26static inline bool dl_time_before(u64 a, u64 b)
27{
28 return (s64)(a - b) < 0;
29}
30
31#endif /* _LINUX_SCHED_DEADLINE_H */