aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-07-17 22:51:33 +0200
committerSebastian Andrzej Siewior <bigeasy@linutronix.de>2016-02-13 00:34:56 +0100
commitc3630e5741f0c969783851f9b9eed7b53d1969d5 (patch)
tree494c5019b56756a7c7890d053e42fe3ec9e466ac
parent804582f5693efd9e26b10bcf8ae9042d058ca8a7 (diff)
downloadrt-linux-c3630e5741f0c969783851f9b9eed7b53d1969d5.tar.gz
sched: Use the proper LOCK_OFFSET for cond_resched()
RT does not increment preempt count when a 'sleeping' spinlock is locked. Update PREEMPT_LOCK_OFFSET for that case. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r--include/linux/preempt.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 57c7731bfe047a..210bd26b1882d4 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -91,7 +91,11 @@
/*
* The preempt_count offset after spin_lock()
*/
+#if !defined(CONFIG_PREEMPT_RT_FULL)
#define PREEMPT_LOCK_OFFSET PREEMPT_DISABLE_OFFSET
+#else
+#define PREEMPT_LOCK_OFFSET 0
+#endif
/*
* The preempt_count offset needed for things like: