diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-05-06 18:28:41 +0200 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2010-05-06 18:28:41 +0200 |
commit | ee84b8243b07c33a5c8aed42b4b2da60cb16d1d2 (patch) | |
tree | a5b3cad55179fe8340c6422deaf6e11120222ad1 /kernel/rcupdate.c | |
parent | memcg: css_id() must be called under rcu_read_lock() (diff) | |
download | linux-ee84b8243b07c33a5c8aed42b4b2da60cb16d1d2.tar.xz linux-ee84b8243b07c33a5c8aed42b4b2da60cb16d1d2.zip |
rcu: create rcu_my_thread_group_empty() wrapper
Some RCU-lockdep splat repairs need to know whether they are running
in a single-threaded process. Unfortunately, the thread_group_empty()
primitive is defined in sched.h, and can induce #include hell. This
commit therefore introduces a rcu_my_thread_group_empty() wrapper that
is defined in rcupdate.c, thus avoiding the need to include sched.h
everywhere.
Signed-off-by: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Diffstat (limited to 'kernel/rcupdate.c')
-rw-r--r-- | kernel/rcupdate.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/kernel/rcupdate.c b/kernel/rcupdate.c index 03a7ea1579f6..49d808e833b0 100644 --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c @@ -122,3 +122,14 @@ void wakeme_after_rcu(struct rcu_head *head) rcu = container_of(head, struct rcu_synchronize, head); complete(&rcu->completion); } + +#ifdef CONFIG_PROVE_RCU +/* + * wrapper function to avoid #include problems. + */ +int rcu_my_thread_group_empty(void) +{ + return thread_group_empty(current); +} +EXPORT_SYMBOL_GPL(rcu_my_thread_group_empty); +#endif /* #ifdef CONFIG_PROVE_RCU */ |