Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1378705

[PATCH v3 4/6] sched: Move dl_policy() to "include/linux/sched.h"

From Xunlei Pang <xlpang@redhat.com>
Newsgroups linux.kernel
Subject [PATCH v3 4/6] sched: Move dl_policy() to "include/linux/sched.h"
Date 2016-04-14 13:40 +0200
Message-ID <rnNMS-Ww-17@gated-at.bofh.it> (permalink)
References <rnNMR-Ww-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Rtmutex code will need dl_policy(), so make it visible to rtmutex.

Signed-off-by: Xunlei Pang <xlpang@redhat.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

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH v3 4/6] sched: Move dl_policy() to "include/linux/sched.h" Xunlei Pang <xlpang@redhat.com> - 2016-04-14 13:40 +0200

csiph-web