datapath: Provide additional RCU backports.
[sliver-openvswitch.git] / datapath / linux / compat / include / linux / rculist.h
index fd9bf10..365d126 100644 (file)
@@ -7,6 +7,7 @@
 #else
 /* Prior to 2.6.26, the contents of rculist.h were part of list.h. */
 #include <linux/list.h>
+#include <linux/rcupdate.h>
 #endif
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
@@ -20,6 +21,12 @@ static inline void hlist_del_init_rcu(struct hlist_node *n)
 }
 #endif
 
+#ifndef hlist_first_rcu
+#define hlist_first_rcu(head)   (*((struct hlist_node __rcu **)(&(head)->first)))
+#define hlist_next_rcu(node)    (*((struct hlist_node __rcu **)(&(node)->next)))
+#define hlist_pprev_rcu(node)   (*((struct hlist_node __rcu **)((node)->pprev)))
+#endif
+
 #undef hlist_for_each_entry_rcu
 #define hlist_for_each_entry_rcu(pos, head, member)                    \
        for (pos = hlist_entry_safe (rcu_dereference_raw(hlist_first_rcu(head)),\