Код: Выделить всё
include/linux/list.h
349 /**
350 * list_for_each_entry - iterate over list of given type
351 * @pos: the type * to use as a loop counter.
352 * @head: the head for your list.
353 * @member: the name of the list_struct within the struct.
354 */
355 #define list_for_each_entry(pos, head, member)
356 for (pos = list_entry((head)->next, typeof(*pos), member),
357 prefetch(pos->member.next);
358 &pos->member != (head);
359 pos = list_entry(pos->member.next, typeof(*pos), member),
360 prefetch(pos->member.next))
-----------------------------------------------------------------------------
почему именно так как написано в 358 строке
нельзя ли, например, сделать так:
pos.member!=(*head);
Или я чего-то не понимаю. Почему именно, так, может разыменовывание указателя медленнее, чем взятие адреса. Помогите.