diff options
Diffstat (limited to 'include/linux/rcupdate.h')
-rw-r--r-- | include/linux/rcupdate.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h index 3432063f4c87..473350462d04 100644 --- a/include/linux/rcupdate.h +++ b/include/linux/rcupdate.h | |||
@@ -330,6 +330,19 @@ static inline void rcu_user_hooks_switch(struct task_struct *prev, | |||
330 | #define rcu_note_voluntary_context_switch(t) do { } while (0) | 330 | #define rcu_note_voluntary_context_switch(t) do { } while (0) |
331 | #endif /* #else #ifdef CONFIG_TASKS_RCU */ | 331 | #endif /* #else #ifdef CONFIG_TASKS_RCU */ |
332 | 332 | ||
333 | /** | ||
334 | * cond_resched_rcu_qs - Report potential quiescent states to RCU | ||
335 | * | ||
336 | * This macro resembles cond_resched(), except that it is defined to | ||
337 | * report potential quiescent states to RCU-tasks even if the cond_resched() | ||
338 | * machinery were to be shut off, as some advocate for PREEMPT kernels. | ||
339 | */ | ||
340 | #define cond_resched_rcu_qs() \ | ||
341 | do { \ | ||
342 | rcu_note_voluntary_context_switch(current); \ | ||
343 | cond_resched(); \ | ||
344 | } while (0) | ||
345 | |||
333 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) | 346 | #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) |
334 | bool __rcu_is_watching(void); | 347 | bool __rcu_is_watching(void); |
335 | #endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */ | 348 | #endif /* #if defined(CONFIG_DEBUG_LOCK_ALLOC) || defined(CONFIG_RCU_TRACE) || defined(CONFIG_SMP) */ |