From d6434e1042f3b0a6dfe1b1f615af369486f9b1fa Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 9 Oct 1999 00:00:47 +0000 Subject: Merge with 2.3.19. --- include/linux/list.h | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'include/linux/list.h') diff --git a/include/linux/list.h b/include/linux/list.h index e77559a68..656aacc2a 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -17,8 +17,10 @@ struct list_head { struct list_head *next, *prev; }; +#define LIST_HEAD_INIT(name) { &(name), &(name) } + #define LIST_HEAD(name) \ - struct list_head name = { &name, &name } + struct list_head name = LIST_HEAD_INIT(name) #define INIT_LIST_HEAD(ptr) do { \ (ptr)->next = (ptr); (ptr)->prev = (ptr); \ @@ -48,6 +50,14 @@ static __inline__ void list_add(struct list_head *new, struct list_head *head) __list_add(new, head, head->next); } +/* + * Insert a new entry before the specified head.. + */ +static __inline__ void list_add_tail(struct list_head *new, struct list_head *head) +{ + __list_add(new, head->prev, head); +} + /* * Delete a list entry by making the prev/next entries * point to each other. -- cgit v1.2.3