From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754475AbcDNLhp (ORCPT ); Thu, 14 Apr 2016 07:37:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47639 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754417AbcDNLhl (ORCPT ); Thu, 14 Apr 2016 07:37:41 -0400 From: Xunlei Pang To: linux-kernel@vger.kernel.org Cc: Peter Zijlstra , Thomas Gleixner , Juri Lelli , Ingo Molnar , Steven Rostedt , Xunlei Pang Subject: [PATCH v3 4/6] sched: Move dl_policy() to "include/linux/sched.h" Date: Thu, 14 Apr 2016 19:37:05 +0800 Message-Id: <1460633827-345-5-git-send-email-xlpang@redhat.com> In-Reply-To: <1460633827-345-1-git-send-email-xlpang@redhat.com> References: <1460633827-345-1-git-send-email-xlpang@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Rtmutex code will need dl_policy(), so make it visible to rtmutex. Signed-off-by: Xunlei Pang --- 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