185: #define LIST_END(head) NULL
186: #define LIST_EMPTY(head) (LIST_FIRST(head) == LIST_END(head))
187: #define LIST_NEXT(elm, field) ((elm)->field.le_next)
189: #define LIST_FOREACH(var, head, field) \
190: for((var) = LIST_FIRST(head); \
191: (var)!= LIST_END(head); \
194: #define LIST_FOREACH_SAFE(var, head, field, tvar) \
195: for ((var) = LIST_FIRST(head); \
196: (var) && ((tvar) = LIST_NEXT(var, field), 1); \
202: #define LIST_INIT(head) do { \
203: LIST_FIRST(head) = LIST_END(head); \
204: } while (0)