X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=list.h;h=db2e84908130676e22f346eedea116254786146d;hp=de04ab9eed1184451f5338b06a7a2be9106aac5d;hb=899677b50128e00e58d76d26c05be9f078204c67;hpb=c6d61cae8b5f71ae658dc254c6ee38a14f34dae2 diff --git a/list.h b/list.h index de04ab9e..db2e8490 100644 --- a/list.h +++ b/list.h @@ -33,6 +33,10 @@ struct list_head { struct list_head *prev; }; +/** Define an initialized list head. */ +#define LIST_HEAD(name) struct list_head name = { &(name), &(name) } + + /** must be called before using any other list functions */ #define INIT_LIST_HEAD(ptr) do { \ (ptr)->next = (ptr); (ptr)->prev = (ptr); \