"STAPCONF_ATOMIC_FETCH_ADD_UNLESS", NULL);
output_autoconf(s, o, cs, "autoconf-lockdown-debugfs.c", "STAPCONF_LOCKDOWN_DEBUGFS", NULL);
output_autoconf(s, o, cs, "autoconf-lockdown-kernel.c", "STAPCONF_LOCKDOWN_KERNEL", NULL);
+ output_autoconf(s, o, cs, "autoconf-hlist_add_tail_rcu.c",
+ "STAPCONF_HLIST_ADD_TAIL_RCU", NULL);
// used by runtime/linux/netfilter.c
output_exportconf(s, o2, "nf_register_hook", "STAPCONF_NF_REGISTER_HOOK");
--- /dev/null
+#include <linux/rculist.h>
+
+void foo(struct hlist_node *n, struct hlist_head *h)
+{
+ hlist_add_tail_rcu(n, h);
+}
}
#endif
-#if LINUX_VERSION_CODE < KERNEL_VERSION(3,10,0)
+#ifndef STAPCONF_HLIST_ADD_TAIL_RCU
// Added in linux 4.7, backported to rhel 7, not present in rhel 6
#define hlist_first_rcu(head) (*((struct hlist_node __rcu **)(&(head)->first)))
#define hlist_next_rcu(node) (*((struct hlist_node __rcu **)(&(node)->next)))