Lines Matching refs:pos

340  * @pos:	the &struct list_head to use as a loop counter.
343 #define list_for_each(pos, head) \
344 for (pos = (head)->next, prefetch(pos->next); pos != (head); \
345 pos = pos->next, prefetch(pos->next))
349 * @pos: the &struct list_head to use as a loop counter.
357 #define __list_for_each(pos, head) \
358 for (pos = (head)->next; pos != (head); pos = pos->next)
362 * @pos: the &struct list_head to use as a loop counter.
365 #define list_for_each_prev(pos, head) \
366 for (pos = (head)->prev, prefetch(pos->prev); pos != (head); \
367 pos = pos->prev, prefetch(pos->prev))
371 * @pos: the &struct list_head to use as a loop counter.
375 #define list_for_each_safe(pos, n, head) \
376 for (pos = (head)->next, n = pos->next; pos != (head); \
377 pos = n, n = pos->next)
381 * @pos: the type * to use as a loop counter.
385 #define list_for_each_entry(pos, head, member) \
386 for (pos = list_entry((head)->next, typeof(*pos), member), \
387 prefetch(pos->member.next); \
388 &pos->member != (head); \
389 pos = list_entry(pos->member.next, typeof(*pos), member), \
390 prefetch(pos->member.next))
394 * @pos: the type * to use as a loop counter.
398 #define list_for_each_entry_reverse(pos, head, member) \
399 for (pos = list_entry((head)->prev, typeof(*pos), member), \
400 prefetch(pos->member.prev); \
401 &pos->member != (head); \
402 pos = list_entry(pos->member.prev, typeof(*pos), member), \
403 prefetch(pos->member.prev))
406 * list_prepare_entry - prepare a pos entry for use as a start point in
408 * @pos: the type * to use as a start point
412 #define list_prepare_entry(pos, head, member) \
413 ((pos) ? : list_entry(head, typeof(*pos), member))
418 * @pos: the type * to use as a loop counter.
422 #define list_for_each_entry_continue(pos, head, member) \
423 for (pos = list_entry(pos->member.next, typeof(*pos), member), \
424 prefetch(pos->member.next); \
425 &pos->member != (head); \
426 pos = list_entry(pos->member.next, typeof(*pos), member), \
427 prefetch(pos->member.next))
431 * @pos: the type * to use as a loop counter.
436 #define list_for_each_entry_safe(pos, n, head, member) \
437 for (pos = list_entry((head)->next, typeof(*pos), member), \
438 n = list_entry(pos->member.next, typeof(*pos), member); \
439 &pos->member != (head); \
440 pos = n, n = list_entry(n->member.next, typeof(*n), member))
444 * @pos: the &struct list_head to use as a loop counter.
451 #define list_for_each_rcu(pos, head) \
452 for (pos = (head)->next, prefetch(pos->next); pos != (head); \
453 pos = pos->next, ({ smp_read_barrier_depends(); 0;}), prefetch(pos->next))
455 #define __list_for_each_rcu(pos, head) \
456 for (pos = (head)->next; pos != (head); \
457 pos = pos->next, ({ smp_read_barrier_depends(); 0;}))
462 * @pos: the &struct list_head to use as a loop counter.
470 #define list_for_each_safe_rcu(pos, n, head) \
471 for (pos = (head)->next, n = pos->next; pos != (head); \
472 pos = n, ({ smp_read_barrier_depends(); 0;}), n = pos->next)
476 * @pos: the type * to use as a loop counter.
484 #define list_for_each_entry_rcu(pos, head, member) \
485 for (pos = list_entry((head)->next, typeof(*pos), member), \
486 prefetch(pos->member.next); \
487 &pos->member != (head); \
488 pos = list_entry(pos->member.next, typeof(*pos), member), \
490 prefetch(pos->member.next))
496 * @pos: the &struct list_head to use as a loop counter.
503 #define list_for_each_continue_rcu(pos, head) \
504 for ((pos) = (pos)->next, prefetch((pos)->next); (pos) != (head); \
505 (pos) = (pos)->next, ({ smp_read_barrier_depends(); 0;}), prefetch((pos)->next))
653 #define hlist_for_each(pos, head) \
654 for (pos = (head)->first; pos && ({ prefetch(pos->next); 1; }); \
655 pos = pos->next)
657 #define hlist_for_each_safe(pos, n, head) \
658 for (pos = (head)->first; pos && ({ n = pos->next; 1; }); \
659 pos = n)
664 * @pos: the &struct hlist_node to use as a loop counter.
668 #define hlist_for_each_entry(tpos, pos, head, member) \
669 for (pos = (head)->first; \
670 pos && ({ prefetch(pos->next); 1;}) && \
671 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
672 pos = pos->next)
677 * @pos: the &struct hlist_node to use as a loop counter.
680 #define hlist_for_each_entry_continue(tpos, pos, member) \
681 for (pos = (pos)->next; \
682 pos && ({ prefetch(pos->next); 1;}) && \
683 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
684 pos = pos->next)
689 * @pos: the &struct hlist_node to use as a loop counter.
692 #define hlist_for_each_entry_from(tpos, pos, member) \
693 for (; pos && ({ prefetch(pos->next); 1;}) && \
694 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
695 pos = pos->next)
700 * @pos: the &struct hlist_node to use as a loop counter.
705 #define hlist_for_each_entry_safe(tpos, pos, n, head, member) \
706 for (pos = (head)->first; \
707 pos && ({ n = pos->next; 1; }) && \
708 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
709 pos = n)
713 * @pos: the type * to use as a loop counter.
714 * @pos: the &struct hlist_node to use as a loop counter.
722 #define hlist_for_each_entry_rcu(tpos, pos, head, member) \
723 for (pos = (head)->first; \
724 pos && ({ prefetch(pos->next); 1;}) && \
725 ({ tpos = hlist_entry(pos, typeof(*tpos), member); 1;}); \
726 pos = pos->next, ({ smp_read_barrier_depends(); 0; }) )