summaryrefslogtreecommitdiffstats
path: root/include/linux/list.h
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-10-09 00:00:47 +0000
commitd6434e1042f3b0a6dfe1b1f615af369486f9b1fa (patch)
treee2be02f33984c48ec019c654051d27964e42c441 /include/linux/list.h
parent609d1e803baf519487233b765eb487f9ec227a18 (diff)
Merge with 2.3.19.
Diffstat (limited to 'include/linux/list.h')
-rw-r--r--include/linux/list.h12
1 files changed, 11 insertions, 1 deletions
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); \
@@ -49,6 +51,14 @@ static __inline__ void list_add(struct list_head *new, struct list_head *head)
}
/*
+ * 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.
*