]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blob - include/linux/sched/deadline.h
Merge tag 'efi-urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi into...
[mirror_ubuntu-artful-kernel.git] / include / linux / sched / deadline.h
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
14 static inline int dl_prio(int prio)
15 {
16 if (unlikely(prio < MAX_DL_PRIO))
17 return 1;
18 return 0;
19 }
20
21 static inline int dl_task(struct task_struct *p)
22 {
23 return dl_prio(p->prio);
24 }
25
26 static inline bool dl_time_before(u64 a, u64 b)
27 {
28 return (s64)(a - b) < 0;
29 }
30
31 #endif /* _LINUX_SCHED_DEADLINE_H */