From 685264b0c880e137a642b40437754c2b62613b50 Mon Sep 17 00:00:00 2001 From: jhb Date: Thu, 5 Jan 2012 19:02:52 +0000 Subject: [PATCH 65/65] Fix a logic bug in change 228207 in the check for a thread's new user priority being a realtime priority. MFC after: 3 days git-svn-id: http://svn.freebsd.org/base/head@229622 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f (cherry picked from commit a8741392969ffb0336dc636b4d92d42323b3a498) Signed-off-by: Xin Li --- sys/kern/kern_resource.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/sys/kern/kern_resource.c b/sys/kern/kern_resource.c index 09c1d30..b45754e 100644 --- a/sys/kern/kern_resource.c +++ b/sys/kern/kern_resource.c @@ -497,7 +497,7 @@ rtp_to_pri(struct rtprio *rtp, struct thread *td) oldpri = td->td_user_pri; sched_user_prio(td, newpri); if (td->td_user_pri != oldpri && (td == curthread || - td->td_priority == oldpri || td->td_user_pri >= PRI_MAX_REALTIME)) + td->td_priority == oldpri || td->td_user_pri <= PRI_MAX_REALTIME)) sched_prio(td, td->td_user_pri); if (TD_ON_UPILOCK(td) && oldpri != newpri) { critical_enter(); -- 1.7.8.3