Lines Matching refs:pos

335  * @pos:	the &struct list_head to use as a loop counter.
338 #define list_for_each(pos, head) \
339 for (pos = (head)->next, prefetch(pos->next); pos != (head); \
340 pos = pos->next, prefetch(pos->next))
344 * @pos: the &struct list_head to use as a loop counter.
352 #define __list_for_each(pos, head) \
353 for (pos = (head)->next; pos != (head); pos = pos->next)
357 * @pos: the &struct list_head to use as a loop counter.
360 #define list_for_each_prev(pos, head) \
361 for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
362 pos = pos->prev, prefetch(pos->prev))
366 * @pos: the &struct list_head to use as a loop counter.
370 #define list_for_each_safe(pos, n, head) \
371 for (pos = (head)->next, n = pos->next; pos != (head); \
372 pos = n, n = pos->next)
376 * @pos: the type * to use as a loop counter.
380 #define list_for_each_entry(pos, head, member) \
381 for (pos = list_entry((head)->next, typeof(*pos), member), \
382 prefetch(pos->member.next); \
383 &pos->member != (head); \
384 pos = list_entry(pos->member.next, typeof(*pos), member), \
385 prefetch(pos->member.next))
389 * @pos: the type * to use as a loop counter.
393 #define list_for_each_entry_reverse(pos, head, member) \
394 for (pos = list_entry((head)->prev, typeof(*pos), member), \
395 prefetch(pos->member.prev); \
396 &pos->member != (head); \
397 pos = list_entry(pos->member.prev, typeof(*pos), member), \
398 prefetch(pos->member.prev))
401 * list_prepare_entry - prepare a pos entry for use as a start point in
403 * @pos: the type * to use as a start point
407 #define list_prepare_entry(pos, head, member) \
408 ((pos) ? : list_entry(head, typeof(*pos), member))
413 * @pos: the type * to use as a loop counter.
417 #define list_for_each_entry_continue(pos, head, member) \
418 for (pos = list_entry(pos->member.next, typeof(*pos), member), \
419 prefetch(pos->member.next); \
420 &pos->member != (head); \
421 pos = list_entry(pos->member.next, typeof(*pos), member), \
422 prefetch(pos->member.next))
426 * @pos: the type * to use as a loop counter.
431 #define list_for_each_entry_safe(pos, n, head, member) \
432 for (pos = list_entry((head)->next, typeof(*pos), member), \
433 n = list_entry(pos->member.next, typeof(*pos), member); \
434 &pos->member != (head); \
435 pos = n, n = list_entry(n->member.next, typeof(*n), member))
439 * @pos: the &struct list_head to use as a loop counter.
446 #define list_for_each_rcu(pos, head) \
447 for (pos = (head)->next, prefetch(pos->next); pos != (head); \
448 pos = pos->next, ({ smp_read_barrier_depends(); 0;}), prefetch(pos->next))
450 #define __list_for_each_rcu(pos, head) \
451 for (pos = (head)->next; pos != (head); \
452 pos = pos->next, ({ smp_read_barrier_depends(); 0;}))
457 * @pos: the &struct list_head to use as a loop counter.
465 #define list_for_each_safe_rcu(pos, n, head) \
466 for (pos = (head)->next, n = pos->next; pos != (head); \
467 pos = n, ({ smp_read_barrier_depends(); 0;}), n = pos->next)
471 * @pos: the type * to use as a loop counter.
479 #define list_for_each_entry_rcu(pos, head, member) \
480 for (pos = list_entry((head)->next, typeof(*pos), member), \
481 prefetch(pos->member.next); \
482 &pos->member != (head); \
483 pos = list_entry(pos->member.next, typeof(*pos), member), \
485 prefetch(pos->member.next))
491 * @pos: the &struct list_head to use as a loop counter.
498 #define list_for_each_continue_rcu(pos, head) \
499 for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \
500 (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next))
648 #define hlist_for_each(pos, head) \
649 for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \
650 pos = pos->next)
652 #define hlist_for_each_safe(pos, n, head) \
653 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
654 pos = n)
659 * @pos: the &struct hlist_node to use as a loop counter.
663 #define hlist_for_each_entry(tpos, pos, head, member) \
664 for (pos = (head)->first; \
665 pos && ({ prefetch(pos->next); 1;}) && \
666 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
667 pos = pos->next)
672 * @pos: the &struct hlist_node to use as a loop counter.
675 #define hlist_for_each_entry_continue(tpos, pos, member) \
676 for (pos = (pos)->next; \
677 pos && ({ prefetch(pos->next); 1;}) && \
678 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
679 pos = pos->next)
684 * @pos: the &struct hlist_node to use as a loop counter.
687 #define hlist_for_each_entry_from(tpos, pos, member) \
688 for (; pos && ({ prefetch(pos->next); 1;}) && \
689 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
690 pos = pos->next)
695 * @pos: the &struct hlist_node to use as a loop counter.
700 #define hlist_for_each_entry_safe(tpos, pos, n, head, member) \
701 for (pos = (head)->first; \
702 pos && ({ n = pos->next; 1; }) && \
703 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
704 pos = n)
708 * @pos: the type * to use as a loop counter.
709 * @pos: the &struct hlist_node to use as a loop counter.
717 #define hlist_for_each_entry_rcu(tpos, pos, head, member) \
718 for (pos = (head)->first; \
719 pos && ({ prefetch(pos->next); 1;}) && \
720 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
721 pos = pos->next, ({ smp_read_barrier_depends(); 0; }) )