lkml.org 
[lkml]   [2014]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[tip:sched/core] sched: prio: Use NICE_WIDTH macro to avoid using of hard coding of 40 and 20 in prio.h.
Commit-ID:  eb2ae7dad9dad350b4444962465d7e09bcfc128a
Gitweb: http://git.kernel.org/tip/eb2ae7dad9dad350b4444962465d7e09bcfc128a
Author: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
AuthorDate: Tue, 11 Feb 2014 15:34:47 +0800
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitDate: Fri, 21 Feb 2014 21:43:20 +0100

sched: prio: Use NICE_WIDTH macro to avoid using of hard coding of 40 and 20 in prio.h.

cc: Ingo Molnar <mingo@kernel.org>
cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Dongsheng Yang <yangds.fnst@cn.fujitsu.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/72dc351df816a975e30b6320754fb52823d2aa3f.1392103744.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
include/linux/sched/prio.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/sched/prio.h b/include/linux/sched/prio.h
index c6974c4..ac32258 100644
--- a/include/linux/sched/prio.h
+++ b/include/linux/sched/prio.h
@@ -21,8 +21,8 @@
#define MAX_USER_RT_PRIO 100
#define MAX_RT_PRIO MAX_USER_RT_PRIO

-#define MAX_PRIO (MAX_RT_PRIO + 40)
-#define DEFAULT_PRIO (MAX_RT_PRIO + 20)
+#define MAX_PRIO (MAX_RT_PRIO + NICE_WIDTH)
+#define DEFAULT_PRIO (MAX_RT_PRIO + NICE_WIDTH / 2)

/*
* Convert user-nice values [ -20 ... 0 ... 19 ]

\
 
 \ /
  Last update: 2014-02-22 02:41    [W:0.336 / U:0.148 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site