Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 
0003 /*
0004  * SCHED_DEADLINE tasks has negative priorities, reflecting
0005  * the fact that any of them has higher prio than RT and
0006  * NORMAL/BATCH tasks.
0007  */
0008 
0009 #include <linux/sched.h>
0010 
0011 #define MAX_DL_PRIO     0
0012 
0013 static inline int dl_prio(int prio)
0014 {
0015     if (unlikely(prio < MAX_DL_PRIO))
0016         return 1;
0017     return 0;
0018 }
0019 
0020 static inline int dl_task(struct task_struct *p)
0021 {
0022     return dl_prio(p->prio);
0023 }
0024 
0025 static inline bool dl_time_before(u64 a, u64 b)
0026 {
0027     return (s64)(a - b) < 0;
0028 }
0029 
0030 #ifdef CONFIG_SMP
0031 
0032 struct root_domain;
0033 extern void dl_add_task_root_domain(struct task_struct *p);
0034 extern void dl_clear_root_domain(struct root_domain *rd);
0035 
0036 #endif /* CONFIG_SMP */