25 lines
834 B
Diff
25 lines
834 B
Diff
|
Subject: sched: Use the proper LOCK_OFFSET for cond_resched()
|
||
|
From: Thomas Gleixner <tglx@linutronix.de>
|
||
|
Date: Sun, 17 Jul 2011 22:51:33 +0200
|
||
|
Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.1/patches-4.1.3-rt3.tar.xz
|
||
|
|
||
|
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>
|
||
|
---
|
||
|
include/linux/sched.h | 2 +-
|
||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||
|
|
||
|
--- a/include/linux/sched.h
|
||
|
+++ b/include/linux/sched.h
|
||
|
@@ -2926,7 +2926,7 @@ extern int _cond_resched(void);
|
||
|
|
||
|
extern int __cond_resched_lock(spinlock_t *lock);
|
||
|
|
||
|
-#ifdef CONFIG_PREEMPT_COUNT
|
||
|
+#if defined(CONFIG_PREEMPT_COUNT) && !defined(CONFIG_PREEMPT_RT_FULL)
|
||
|
#define PREEMPT_LOCK_OFFSET PREEMPT_OFFSET
|
||
|
#else
|
||
|
#define PREEMPT_LOCK_OFFSET 0
|