вот интересно в linux/list.h есть такой код
#define list_for_each(pos, head) \
for (pos = (head)->next; prefetch(pos->next), pos != (head); \
pos = pos->next)
struct list_head *head, *pos, **ppos = &pos;
list_for_each(*ppos, head)
{
//...
}
#define list_for_each(pos, head) \
for (pos = (head)->next; prefetch((pos)->next), pos != (head); \
pos = (pos)->next)
list_for_each((*ppos), head)
{
//...
}