mirror of https://github.com/thesofproject/sof.git
Merge pull request #303 from dabekjakub/list_delete
list: added list_item_del_init
This commit is contained in:
commit
4c0b1d4712
|
@ -72,13 +72,24 @@ static inline void list_item_append(struct list_item *item,
|
|||
list->prev = item;
|
||||
}
|
||||
|
||||
/* delete item from the list */
|
||||
/* delete item from the list leaves deleted list item
|
||||
*in undefined state list_is_empty won't return true
|
||||
*/
|
||||
static inline void list_item_del(struct list_item *item)
|
||||
{
|
||||
item->next->prev = item->prev;
|
||||
item->prev->next = item->next;
|
||||
}
|
||||
|
||||
/* delete item from the list list iteam will be reinitialised
|
||||
* and list_is_empty will return true
|
||||
*/
|
||||
static inline void list_item_del_init(struct list_item *item)
|
||||
{
|
||||
list_item_del(item);
|
||||
list_init(item);
|
||||
}
|
||||
|
||||
/* is list item the last item in list ? */
|
||||
static inline int list_item_is_last(struct list_item *item,
|
||||
struct list_item *list)
|
||||
|
|
Loading…
Reference in New Issue