mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Robert Love <rml@tech9.net>
To: torvalds@transmeta.com
Cc: Andrew Morton <akpm@digeo.com>, Ingo Molnar <mingo@elte.hu>,
	linux-kernel@vger.kernel.org
Subject: [patch] simple task_prio() fix
Date: 07 Mar 2003 17:14:45 -0500	[thread overview]
Message-ID: <1047075285.12130.4.camel@phantasy.awol.org> (raw)

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;
 }
 
 /**




                 reply	other threads:[~2003-03-07 22:04 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1047075285.12130.4.camel@phantasy.awol.org \
    --to=rml@tech9.net \
    --cc=akpm@digeo.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@transmeta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®