svn commit: r217291 - head/sys/kern

John Baldwin jhb at FreeBSD.org
Tue Jan 11 22:13:19 UTC 2011


Author: jhb
Date: Tue Jan 11 22:13:19 2011
New Revision: 217291
URL: http://svn.freebsd.org/changeset/base/217291

Log:
  Always use PRI_BASE() when checking the base type of a thread's priority
  class.
  
  MFC after:	2 weeks

Modified:
  head/sys/kern/sched_ule.c

Modified: head/sys/kern/sched_ule.c
==============================================================================
--- head/sys/kern/sched_ule.c	Tue Jan 11 22:07:39 2011	(r217290)
+++ head/sys/kern/sched_ule.c	Tue Jan 11 22:13:19 2011	(r217291)
@@ -1388,7 +1388,7 @@ sched_priority(struct thread *td)
 	int score;
 	int pri;
 
-	if (td->td_pri_class != PRI_TIMESHARE)
+	if (PRI_BASE(td->td_pri_class) != PRI_TIMESHARE)
 		return;
 	/*
 	 * If the score is interactive we place the thread in the realtime
@@ -2124,7 +2124,7 @@ sched_clock(struct thread *td)
 	ts = td->td_sched;
 	if (td->td_pri_class & PRI_FIFO_BIT)
 		return;
-	if (td->td_pri_class == PRI_TIMESHARE) {
+	if (PRI_BASE(td->td_pri_class) == PRI_TIMESHARE) {
 		/*
 		 * We used a tick; charge it to the thread so
 		 * that we can compute our interactivity.


More information about the svn-src-head mailing list