aboutsummaryrefslogtreecommitdiff
path: root/include/linux/rcutree.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rcutree.h')
-rw-r--r--include/linux/rcutree.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h
index d4368b7975c..a722fb67bb2 100644
--- a/include/linux/rcutree.h
+++ b/include/linux/rcutree.h
@@ -326,4 +326,10 @@ static inline void rcu_exit_nohz(void)
}
#endif /* CONFIG_NO_HZ */
+/* A context switch is a grace period for rcutree. */
+static inline int rcu_blocking_is_gp(void)
+{
+ return num_online_cpus() == 1;
+}
+
#endif /* __LINUX_RCUTREE_H */