1 #ifndef __LINUX_RCULIST_WRAPPER_H
2 #define __LINUX_RCULIST_WRAPPER_H
4 #include <linux/version.h>
5 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
6 #include_next <linux/rculist.h>
8 /* Prior to 2.6.26, the contents of rculist.h were part of list.h. */
9 #include <linux/list.h>
12 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
13 #define hlist_del_init_rcu rpl_hlist_del_init_rcu
14 static inline void hlist_del_init_rcu(struct hlist_node *n)
16 if (!hlist_unhashed(n)) {
23 #undef hlist_for_each_entry_rcu
24 #define hlist_for_each_entry_rcu(pos, head, member) \
25 for (pos = hlist_entry_safe (rcu_dereference_raw(hlist_first_rcu(head)),\
26 typeof(*(pos)), member); \
28 pos = hlist_entry_safe(rcu_dereference_raw(hlist_next_rcu(\
29 &(pos)->member)), typeof(*(pos)), member))