X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Finclude%2Fpalacios%2Fvmm_list.h;h=f1e878f5a616104e61fee4deb5c99ffe60dd08f3;hb=7043e3314c5843994dbd6615aca71b0378950b3e;hp=f44933af52685a406e65b8130e4e520d1ccde6bc;hpb=0121a4503305424096e2b5c5bd3b6c3af2d813e5;p=palacios.git diff --git a/palacios/include/palacios/vmm_list.h b/palacios/include/palacios/vmm_list.h index f44933a..f1e878f 100644 --- a/palacios/include/palacios/vmm_list.h +++ b/palacios/include/palacios/vmm_list.h @@ -263,6 +263,21 @@ static inline void list_splice_init(struct list_head *list, +/** + * list_next_entry -- get the struct for the next entry in a list + * @ptr: current list entry + * @type: type of the struct this is embedded in + * @member: name of the list struct within the struct + */ +#define list_next_entry(node, type, member) \ + ({ \ + type * next = NULL; \ + if ((node)->next != (node)) { \ + next = list_entry((node)->next, type, member); \ + } \ + next; \ + }) + /** * list_for_each - iterate over a list