aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/sched/deadline.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sched/deadline.h')
-rw-r--r--include/linux/sched/deadline.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/include/linux/sched/deadline.h b/include/linux/sched/deadline.h
index 1aff00b65f3c..f9aabbc9d22e 100644
--- a/include/linux/sched/deadline.h
+++ b/include/linux/sched/deadline.h
@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef _LINUX_SCHED_DEADLINE_H
+#define _LINUX_SCHED_DEADLINE_H
/*
* SCHED_DEADLINE tasks has negative priorities, reflecting
@@ -6,16 +8,18 @@
* NORMAL/BATCH tasks.
*/
-#define MAX_DL_PRIO 0
+#include <linux/sched.h>
-static inline int dl_prio(int prio)
+static inline bool dl_prio(int prio)
{
- if (unlikely(prio < MAX_DL_PRIO))
- return 1;
- return 0;
+ return unlikely(prio < MAX_DL_PRIO);
}
-static inline int dl_task(struct task_struct *p)
+/*
+ * Returns true if a task has a priority that belongs to DL class. PI-boosted
+ * tasks will return true. Use dl_policy() to ignore PI-boosted tasks.
+ */
+static inline bool dl_task(struct task_struct *p)
{
return dl_prio(p->prio);
}
@@ -30,5 +34,11 @@ static inline bool dl_time_before(u64 a, u64 b)
struct root_domain;
extern void dl_add_task_root_domain(struct task_struct *p);
extern void dl_clear_root_domain(struct root_domain *rd);
+extern void dl_clear_root_domain_cpu(int cpu);
#endif /* CONFIG_SMP */
+
+extern u64 dl_cookie;
+extern bool dl_bw_visited(int cpu, u64 cookie);
+
+#endif /* _LINUX_SCHED_DEADLINE_H */