mirror of https://github.com/thesofproject/sof.git
list: add list previous iterator
Signed-off-by: Liam Girdwood <liam.r.girdwood@linux.intel.com>
This commit is contained in:
parent
69222cf7d7
commit
405b1f34f2
|
@ -109,6 +109,10 @@ static inline int list_item_is_last(struct list_item *item,
|
|||
#define list_for_item(item, list) \
|
||||
for (item = (list)->next; item != (list); item = item->next)
|
||||
|
||||
/* list iterator */
|
||||
#define list_for_item_prev(item, list) \
|
||||
for (item = (list)->prev; item != (list); item = item->prev)
|
||||
|
||||
/* list iterator - safe to delete items */
|
||||
#define list_for_item_safe(item, tmp, list) \
|
||||
for (item = (list)->next, tmp = item->next;\
|
||||
|
|
Loading…
Reference in New Issue