aboutsummaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
Diffstat (limited to 'kernel')
-rw-r--r--kernel/sched_rt.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
index b591b89710a..1a2d8f0aa65 100644
--- a/kernel/sched_rt.c
+++ b/kernel/sched_rt.c
@@ -4,16 +4,24 @@
*/
#ifdef CONFIG_SMP
+
+/*
+ * The "RT overload" flag: it gets set if a CPU has more than
+ * one runnable RT task.
+ */
static cpumask_t rt_overload_mask;
static atomic_t rto_count;
+
static inline int rt_overloaded(void)
{
return atomic_read(&rto_count);
}
+
static inline cpumask_t *rt_overload(void)
{
return &rt_overload_mask;
}
+
static inline void rt_set_overload(struct rq *rq)
{
rq->rt.overloaded = 1;
@@ -28,6 +36,7 @@ static inline void rt_set_overload(struct rq *rq)
wmb();
atomic_inc(&rto_count);
}
+
static inline void rt_clear_overload(struct rq *rq)
{
/* the order here really doesn't matter */