Add this handy function for removing an item from a list and
initializing its list pointers.

Signed-off-by: Pete Wyckoff <[EMAIL PROTECTED]>
---
 usr/list.h |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/usr/list.h b/usr/list.h
index 3e85c9b..d2e0019 100644
--- a/usr/list.h
+++ b/usr/list.h
@@ -83,4 +83,10 @@ static inline void list_del(struct list_head *entry)
        entry->next = entry->prev = NULL;
 }
 
+static inline void list_del_init(struct list_head *entry)
+{
+       __list_del(entry->prev, entry->next);
+       INIT_LIST_HEAD(entry);
+}
+
 #endif
-- 
1.5.3.4

_______________________________________________
Stgt-devel mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/stgt-devel

Reply via email to