list.h:add list_for_every_entry_safe_from
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
This commit is contained in:
parent
b36521d4a4
commit
17ede2fde4
@ -257,6 +257,13 @@
|
||||
&entry->member != (list); entry = temp, \
|
||||
temp = container_of(temp->member.next, type, member))
|
||||
|
||||
/* Iterate from a given entry node in a safe way */
|
||||
|
||||
#define list_for_every_entry_safe_from(list, cur, temp, type, member) \
|
||||
for ((temp) = list_next_entry(cur, type, member); \
|
||||
&(cur)->member != (list); \
|
||||
(cur) = (temp), (temp) = list_next_entry(temp, type, member))
|
||||
|
||||
#define list_for_every_entry_continue(list, head, type, member) \
|
||||
for ((list) = list_next_entry(list, type, member); \
|
||||
&(list)->member != (head); \
|
||||
|
Loading…
Reference in New Issue
Block a user