+ wait_for_quiescent_state(); /* Wait readers in parity 1 */
+
+ /* Finish waiting for reader threads before letting the old ptr being
+ * freed. Must be done within internal_urcu_lock because it iterates on
+ * reader threads. */
+ force_mb_all_threads();
+
+ internal_urcu_unlock();
+}
+
+/*
+ * library wrappers to be used by non-LGPL compatible source code.
+ */
+
+void rcu_read_lock(void)
+{
+ _rcu_read_lock();
+}
+
+void rcu_read_unlock(void)
+{
+ _rcu_read_unlock();
+}
+
+void *rcu_dereference(void *p)
+{
+ return _rcu_dereference(p);
+}
+
+void *rcu_assign_pointer_sym(void **p, void *v)
+{
+ wmb();
+ return STORE_SHARED(p, v);
+}
+
+void *rcu_xchg_pointer_sym(void **p, void *v)
+{
+ wmb();
+ return xchg(p, v);
+}
+
+void *rcu_publish_content_sym(void **p, void *v)
+{
+ void *oldptr;
+
+ oldptr = _rcu_xchg_pointer(p, v);
+ synchronize_rcu();