summaryrefslogtreecommitdiffstats
path: root/include/linux/rcuclassic.h
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-11 17:10:07 +1100
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2009-03-11 17:10:07 +1100
commite14eee56c2280953c6e3d24d5dce42bd90836b81 (patch)
tree21ab792d9ad6fbbab460058f352a0158f995644e /include/linux/rcuclassic.h
parentd6ee6f7e4c74d9a0fed7544f4d389bde004651d3 (diff)
parent99adcd9d67aaf04e28f5ae96df280f236bde4b66 (diff)
Merge commit 'origin/master' into next
Diffstat (limited to 'include/linux/rcuclassic.h')
-rw-r--r--include/linux/rcuclassic.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/rcuclassic.h b/include/linux/rcuclassic.h
index f3f697df1d7..80044a4f3ab 100644
--- a/include/linux/rcuclassic.h
+++ b/include/linux/rcuclassic.h
@@ -181,4 +181,10 @@ extern long rcu_batches_completed_bh(void);
#define rcu_enter_nohz() do { } while (0)
#define rcu_exit_nohz() do { } while (0)
+/* A context switch is a grace period for rcuclassic. */
+static inline int rcu_blocking_is_gp(void)
+{
+ return num_online_cpus() == 1;
+}
+
#endif /* __LINUX_RCUCLASSIC_H */