+/*
+ * Inform RCU of a quiescent state.
+ *
+ * This function is less than 10 lines long. The intent is that this
+ * function meets the 10-line criterion for LGPL, allowing this function
+ * to be invoked directly from non-LGPL code.
+ *
+ * We skip the memory barriers and gp store if our local ctr already
+ * matches the global rcu_gp.ctr value: this is OK because a prior
+ * _rcu_quiescent_state() or _rcu_thread_online() already updated it
+ * within our thread, so we have no quiescent state to report.
+ */
+static inline void _rcu_quiescent_state(void)
+{
+ unsigned long gp_ctr;
+
+ if ((gp_ctr = CMM_LOAD_SHARED(rcu_gp.ctr)) == URCU_TLS(rcu_reader).ctr)
+ return;
+ _rcu_quiescent_state_update_and_wakeup(gp_ctr);
+}
+