64e3905914b21b3f65967641060926798470b35d
[sliver-openvswitch.git] / datapath / linux / compat / include / linux / rculist.h
1 #ifndef __LINUX_RCULIST_WRAPPER_H
2 #define __LINUX_RCULIST_WRAPPER_H
3
4 #include <linux/version.h>
5 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,26)
6 #include_next <linux/rculist.h>
7 #else
8 /* Prior to 2.6.26, the contents of rculist.h were part of list.h. */
9 #include <linux/list.h>
10 #endif
11
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)
15 {
16         if (!hlist_unhashed(n)) {
17                 __hlist_del(n);
18                 n->pprev = NULL;
19         }
20 }
21 #endif
22
23 #endif