diff options
Diffstat (limited to 'include/linux/list.h')
-rw-r--r-- | include/linux/list.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/list.h b/include/linux/list.h index f29fc9c1a964..ad9dcb9e3375 100644 --- a/include/linux/list.h +++ b/include/linux/list.h | |||
@@ -525,6 +525,20 @@ static inline void list_splice_init_rcu(struct list_head *list, | |||
525 | pos = list_entry(pos->member.next, typeof(*pos), member)) | 525 | pos = list_entry(pos->member.next, typeof(*pos), member)) |
526 | 526 | ||
527 | /** | 527 | /** |
528 | * list_for_each_entry_continue_reverse - iterate backwards from the given point | ||
529 | * @pos: the type * to use as a loop cursor. | ||
530 | * @head: the head for your list. | ||
531 | * @member: the name of the list_struct within the struct. | ||
532 | * | ||
533 | * Start to iterate over list of given type backwards, continuing after | ||
534 | * the current position. | ||
535 | */ | ||
536 | #define list_for_each_entry_continue_reverse(pos, head, member) \ | ||
537 | for (pos = list_entry(pos->member.prev, typeof(*pos), member); \ | ||
538 | prefetch(pos->member.prev), &pos->member != (head); \ | ||
539 | pos = list_entry(pos->member.prev, typeof(*pos), member)) | ||
540 | |||
541 | /** | ||
528 | * list_for_each_entry_from - iterate over list of given type from the current point | 542 | * list_for_each_entry_from - iterate over list of given type from the current point |
529 | * @pos: the type * to use as a loop cursor. | 543 | * @pos: the type * to use as a loop cursor. |
530 | * @head: the head for your list. | 544 | * @head: the head for your list. |