X-Git-Url: http://git.lttng.org/?a=blobdiff_plain;f=wrapper%2Flist.h;h=25e804069b71dd01f457c48b58cbc8c4e3022c50;hb=72e7b8dd70ff6d692fced6d8aa095731a5d31ae9;hp=0d79e5128c7b36555fee4a266d24a99a2550054a;hpb=7a09dcb7df9caab5c867f39f53009e860b98accb;p=lttng-modules.git diff --git a/wrapper/list.h b/wrapper/list.h index 0d79e512..25e80406 100644 --- a/wrapper/list.h +++ b/wrapper/list.h @@ -29,6 +29,13 @@ #include #include +/* + * return the first or the next element in an RCU protected hlist + */ +#define lttng_hlist_first_rcu(head) (*((struct hlist_node __rcu **)(&(head)->first))) +#define lttng_hlist_next_rcu(node) (*((struct hlist_node __rcu **)(&(node)->next))) +#define lttng_hlist_pprev_rcu(node) (*((struct hlist_node __rcu **)((node)->pprev))) + #define lttng_hlist_entry_safe(ptr, type, member) \ ({ typeof(ptr) ____ptr = (ptr); \ ____ptr ? hlist_entry(____ptr, type, member) : NULL; \