diff options
author | Geoff Levand <geoff@infradead.org> | 2012-03-26 20:21:21 -0700 |
---|---|---|
committer | Geoff Levand <geoff@infradead.org> | 2012-03-26 20:21:21 -0700 |
commit | b5958d7864822ec3151edda616952d1d401b139a (patch) | |
tree | 25ba0022eb52af17690e5958466fcb18e632ea33 | |
parent | 7fed96b80c3e81ad73539c90310ab94166ff0229 (diff) | |
download | talos-petitboot-b5958d7864822ec3151edda616952d1d401b139a.tar.gz talos-petitboot-b5958d7864822ec3151edda616952d1d401b139a.zip |
Add new macro DEFINE_LIST()
Signed-off-by: Geoff Levand <geoff@infradead.org>
-rw-r--r-- | lib/list/list.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/list/list.h b/lib/list/list.h index 7f9955f..cd9cd10 100644 --- a/lib/list/list.h +++ b/lib/list/list.h @@ -41,13 +41,15 @@ struct list { for (; _pos; _pos = list_next_entry(_list, _pos, _member)) -#define STATIC_LIST(_list) static struct list _list = { \ +#define DEFINE_LIST(_list) struct list _list = { \ .head = { \ .next = &_list.head, \ .prev = &_list.head \ } \ } +#define STATIC_LIST(_list) static DEFINE_LIST(_list) + void list_init(struct list *list); void list_insert_before(struct list_item *next, struct list_item *item); void list_insert_after(struct list_item *prev, struct list_item *item); |