#define List_For_Each_Safe(pos, n, head) \
for (pos = (head)->next, n = pos->next; pos != (head); \
pos = n, n = pos->next)
+
/*
* Iterate over a list backwards, safe against removal of list entry
*/
for (pos = (head)->prev, n = pos->prev; \
pos != (head); \
pos = n, n = pos->prev)
+
/*
* Test if the entry points to the head of the list
*/
n = List_Next_Entry(pos, member); \
!List_Entry_Is_Head(pos, head, member); \
pos = n, n = List_Next_Entry(n, member))
+
/*
* Continue iteration over a list of a given type, after the current position, safe against removal of list entry
*/
!List_Entry_Is_Head(pos, head, member); \
pos = n, n = List_Next_Entry(n, member))
-
/*
* Iterate over a list of a given type backwards, safe against removal of list entry
*/