File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,13 +72,24 @@ static inline void list_item_append(struct list_item *item,
7272 list -> prev = item ;
7373}
7474
75- /* delete item from the list */
75+ /* delete item from the list leaves deleted list item
76+ *in undefined state list_is_empty won't return true
77+ */
7678static inline void list_item_del (struct list_item * item )
7779{
7880 item -> next -> prev = item -> prev ;
7981 item -> prev -> next = item -> next ;
8082}
8183
84+ /* delete item from the list list iteam will be reinitialised
85+ * and list_is_empty will return true
86+ */
87+ static inline void list_item_del_init (struct list_item * item )
88+ {
89+ list_item_del (item );
90+ list_init (item );
91+ }
92+
8293/* is list item the last item in list ? */
8394static inline int list_item_is_last (struct list_item * item ,
8495 struct list_item * list )
You can’t perform that action at this time.
0 commit comments