We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 834d3cb commit 8044136Copy full SHA for 8044136
1 file changed
src/include/sof/list.h
@@ -72,6 +72,18 @@ static inline void list_item_append(struct list_item *item,
72
list->prev = item;
73
}
74
75
+/* insert new item to the position of the list */
76
+static inline void list_item_insert(struct list_item *item,
77
+ struct list_item *pos)
78
+{
79
+ struct list_item *tmp = pos->next;
80
+
81
+ item->next = tmp;
82
+ item->prev = pos;
83
+ pos->next = item;
84
+ tmp->prev = item;
85
+}
86
87
/* delete item from the list leaves deleted list item
88
*in undefined state list_is_empty won't return true
89
*/
0 commit comments