lkml.org 
[lkml]   [2015]   [Nov]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] sched: fix outdated comment on task_prio() return value
Date
The comment describing the possible return values of the task_prio()
function, having not been updated in many years, was misleading. It
indicated an offset of -200 for RT tasks, and normal tasks having 32
possible priority values centered around 0. This is no longer the
case, as the values it returns will be in the range [-100..39]. The
new comment reflects the current behaviour.

Signed-off-by: Antoine Busque <abusque@efficios.com>
---
kernel/sched/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index bbe9577..b9e5f4a 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -3106,8 +3106,8 @@ SYSCALL_DEFINE1(nice, int, increment)
* @p: the task in question.
*
* Return: The priority value as seen by users in /proc.
- * RT tasks are offset by -200. Normal tasks are centered
- * around 0, value goes from -16 to +15.
+ * Values range from -100 to to -2 for RT tasks, and from
+ * 0 to 39 for normal tasks.
*/
int task_prio(const struct task_struct *p)
{
--
2.6.2


\
 
 \ /
  Last update: 2015-11-29 04:01    [W:0.101 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site