[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1460633827-345-5-git-send-email-xlpang@redhat.com>
Date: Thu, 14 Apr 2016 19:37:05 +0800
From: Xunlei Pang <xlpang@...hat.com>
To: linux-kernel@...r.kernel.org
Cc: Peter Zijlstra <peterz@...radead.org>,
Thomas Gleixner <tglx@...utronix.de>,
Juri Lelli <juri.lelli@....com>,
Ingo Molnar <mingo@...hat.com>,
Steven Rostedt <rostedt@...dmis.org>,
Xunlei Pang <xlpang@...hat.com>
Subject: [PATCH v3 4/6] sched: Move dl_policy() to "include/linux/sched.h"
Rtmutex code will need dl_policy(), so make it visible to rtmutex.
Signed-off-by: Xunlei Pang <xlpang@...hat.com>
---
include/linux/sched.h | 5 +++++
kernel/sched/sched.h | 4 ----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 332a6b5..8ad3522 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -1309,6 +1309,11 @@ struct sched_rt_entity {
#endif
};
+static inline int dl_policy(int policy)
+{
+ return policy == SCHED_DEADLINE;
+}
+
struct sched_dl_entity {
struct rb_node rb_node;
diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h
index a7cbad7..0e6ea02 100644
--- a/kernel/sched/sched.h
+++ b/kernel/sched/sched.h
@@ -99,10 +99,6 @@ static inline int rt_policy(int policy)
return policy == SCHED_FIFO || policy == SCHED_RR;
}
-static inline int dl_policy(int policy)
-{
- return policy == SCHED_DEADLINE;
-}
static inline bool valid_policy(int policy)
{
return idle_policy(policy) || fair_policy(policy) ||
--
1.8.3.1
Powered by blists - more mailing lists