summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2017-04-06 05:39:40 -0700
committerGerrit - the friendly Code Review server <code-review@localhost>2017-04-06 05:39:40 -0700
commit41941e18ba1f26affbcd6feeabb9b032989c102b (patch)
tree832a73d2cd7cbd8d62b2172ddde41c7516934a2b /include
parent4594178f22e3dfd89d1b90e7aae26f6bb7aadfb8 (diff)
parent4748cf2bdee373fba9cec3f1f7e95928ae21c100 (diff)
Merge "sched/debug: Make the "Preemption disabled at ..." message more useful"
Diffstat (limited to 'include')
-rw-r--r--include/linux/sched.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 95d758d63784..4b56a62a0a58 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -3247,6 +3247,15 @@ static inline void cond_resched_rcu(void)
#endif
}
+static inline unsigned long get_preempt_disable_ip(struct task_struct *p)
+{
+#ifdef CONFIG_DEBUG_PREEMPT
+ return p->preempt_disable_ip;
+#else
+ return 0;
+#endif
+}
+
/*
* Does a critical section need to be broken due to another
* task waiting?: (technically does not depend on CONFIG_PREEMPT,