Commit e09758fa authored by Frederic Weisbecker's avatar Frederic Weisbecker Committed by Ingo Molnar

sched: Cover the CONFIG_DEBUG_SPINLOCK_SLEEP off-case for __might_sleep()

Cover the off case for __might_sleep(), so that we avoid
#ifdefs in files that make use of it. Especially, this prepares
for the __might_sleep() pull up on cond_resched().
Signed-off-by: default avatarFrederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: default avatarPeter Zijlstra <a.p.zijlstra@chello.nl>
LKML-Reference: <1247725694-6082-3-git-send-email-fweisbec@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent 4b215567
...@@ -139,6 +139,7 @@ extern int _cond_resched(void); ...@@ -139,6 +139,7 @@ extern int _cond_resched(void);
# define might_sleep() \ # define might_sleep() \
do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0) do { __might_sleep(__FILE__, __LINE__); might_resched(); } while (0)
#else #else
static inline void __might_sleep(char *file, int line) { }
# define might_sleep() do { might_resched(); } while (0) # define might_sleep() do { might_resched(); } while (0)
#endif #endif
......
...@@ -6610,9 +6610,8 @@ static inline int should_resched(void) ...@@ -6610,9 +6610,8 @@ static inline int should_resched(void)
static void __cond_resched(void) static void __cond_resched(void)
{ {
#ifdef CONFIG_DEBUG_SPINLOCK_SLEEP
__might_sleep(__FILE__, __LINE__); __might_sleep(__FILE__, __LINE__);
#endif
add_preempt_count(PREEMPT_ACTIVE); add_preempt_count(PREEMPT_ACTIVE);
schedule(); schedule();
sub_preempt_count(PREEMPT_ACTIVE); sub_preempt_count(PREEMPT_ACTIVE);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment