summaryrefslogtreecommitdiffstats
path: root/kernel/locking/rtmutex.c
diff options
context:
space:
mode:
authorTony Lindgren <tony@atomide.com>2015-06-10 08:37:31 +0200
committerTony Lindgren <tony@atomide.com>2015-06-10 08:37:31 +0200
commit63e63a1981c7247fea41ce97b3144befc8f2fb7b (patch)
tree74a5708579661a741b6c62096530e68aee949273 /kernel/locking/rtmutex.c
parentmmc: omap_hsmmc: Change wake-up interrupt to use generic wakeirq (diff)
parentserial: 8250_omap: Move wake-up interrupt to generic wakeirq (diff)
downloadlinux-63e63a1981c7247fea41ce97b3144befc8f2fb7b.tar.xz
linux-63e63a1981c7247fea41ce97b3144befc8f2fb7b.zip
Merge branch 'wakeirq-8250' into omap-for-v4.2/wakeirq-v2
Diffstat (limited to 'kernel/locking/rtmutex.c')
-rw-r--r--kernel/locking/rtmutex.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c
index b73279367087..b025295f4966 100644
--- a/kernel/locking/rtmutex.c
+++ b/kernel/locking/rtmutex.c
@@ -265,15 +265,17 @@ struct task_struct *rt_mutex_get_top_task(struct task_struct *task)
}
/*
- * Called by sched_setscheduler() to check whether the priority change
- * is overruled by a possible priority boosting.
+ * Called by sched_setscheduler() to get the priority which will be
+ * effective after the change.
*/
-int rt_mutex_check_prio(struct task_struct *task, int newprio)
+int rt_mutex_get_effective_prio(struct task_struct *task, int newprio)
{
if (!task_has_pi_waiters(task))
- return 0;
+ return newprio;
- return task_top_pi_waiter(task)->task->prio <= newprio;
+ if (task_top_pi_waiter(task)->task->prio <= newprio)
+ return task_top_pi_waiter(task)->task->prio;
+ return newprio;
}
/*