aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-17 20:46:52 +0200
committerSteven Rostedt <rostedt@rostedt.homelinux.com>2013-05-20 13:46:11 -0400
commit7d90c3b0cc4cf6eca85f5e27040953e691e7b33b (patch)
tree5be8b6773e595e227b78d12f43391ec770a58df1 /include
parent5916b5191ff1800fcc821059d009f1a16e5c68f9 (diff)
sched-no-work-when-pi-blocked.patch
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 72bfb2da1fbf..367e219a475a 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -2107,12 +2107,20 @@ extern unsigned int sysctl_sched_cfs_bandwidth_slice;
extern int rt_mutex_getprio(struct task_struct *p);
extern void rt_mutex_setprio(struct task_struct *p, int prio);
extern void rt_mutex_adjust_pi(struct task_struct *p);
+static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
+{
+ return tsk->pi_blocked_on != NULL;
+}
#else
static inline int rt_mutex_getprio(struct task_struct *p)
{
return p->normal_prio;
}
# define rt_mutex_adjust_pi(p) do { } while (0)
+static inline bool tsk_is_pi_blocked(struct task_struct *tsk)
+{
+ return false;
+}
#endif
extern bool yield_to(struct task_struct *p, bool preempt);