linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] simple task_prio() fix
@ 2003-03-07 22:14 Robert Love
  0 siblings, 0 replies; only message in thread
From: Robert Love @ 2003-03-07 22:14 UTC (permalink / raw)
  To: torvalds; +Cc: Andrew Morton, Ingo Molnar, linux-kernel

Linus, while we are on the subject of the scheduler...

Trivial fix for task_prio() in the case MAX_RT_PRIO != MAX_USER_RT_PRIO
where all priorities are skewed by (MAX_RT_PRIO - MAX_USER_RT_PRIO). 
The fix makes sense, as the full priority range is unrelated to the
maximum user value.  Only the real maximum RT value matters.

The object code is the same for the 99% of the people who do not touch
the real-time priority defines.

Patch is against current BK - please, apply.

	Robert Love


 kernel/sched.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)


diff -urN linux-2.5.64-bk/kernel/sched.c linux/kernel/sched.c
--- linux-2.5.64-bk/kernel/sched.c	2003-03-07 17:01:34.727552472 -0500
+++ linux/kernel/sched.c	2003-03-07 17:07:56.244553072 -0500
@@ -1629,7 +1629,7 @@
  */
 int task_prio(task_t *p)
 {
-	return p->prio - MAX_USER_RT_PRIO;
+	return p->prio - MAX_RT_PRIO;
 }
 
 /**




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-07 22:04 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-07 22:14 [patch] simple task_prio() fix Robert Love

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).