From 5ec47bace28105c7d90092c9ed079c86c4f20350 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Thu, 12 Jan 2012 13:49:19 -0800 Subject: [PATCH] --- yaml --- r: 288564 b: refs/heads/master c: 50406b98b6372e7de21d903d2cf3914e9d64e094 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/linux/rcupdate.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 915646e5027f..5cadd52b97e2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: c44e2cddacc2cf299186bad5697d738ea19668b7 +refs/heads/master: 50406b98b6372e7de21d903d2cf3914e9d64e094 diff --git a/trunk/include/linux/rcupdate.h b/trunk/include/linux/rcupdate.h index a67d5f1072ea..6df0ae197810 100644 --- a/trunk/include/linux/rcupdate.h +++ b/trunk/include/linux/rcupdate.h @@ -381,8 +381,22 @@ extern int rcu_my_thread_group_empty(void); } \ } while (0) +#if defined(CONFIG_PROVE_RCU) && !defined(CONFIG_PREEMPT_RCU) +static inline void rcu_preempt_sleep_check(void) +{ + rcu_lockdep_assert(!lock_is_held(&rcu_lock_map), + "Illegal context switch in RCU read-side " + "critical section"); +} +#else /* #ifdef CONFIG_PROVE_RCU */ +static inline void rcu_preempt_sleep_check(void) +{ +} +#endif /* #else #ifdef CONFIG_PROVE_RCU */ + #define rcu_sleep_check() \ do { \ + rcu_preempt_sleep_check(); \ rcu_lockdep_assert(!lock_is_held(&rcu_bh_lock_map), \ "Illegal context switch in RCU-bh" \ " read-side critical section"); \