perf tui: Introduce list_head based generic ui_browser refresh routine
So that building other browser based on structures linked via a linked list can be as easy as it is already for the ones linked via an rb_tree. Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Mike Galbraith <efault@gmx.de> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> LKML-Reference: <new-submission> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
@@ -15,4 +15,12 @@ static inline void list_del_range(struct list_head *begin,
|
||||
begin->prev->next = end->next;
|
||||
end->next->prev = begin->prev;
|
||||
}
|
||||
|
||||
/**
|
||||
* list_for_each_from - iterate over a list from one of its nodes
|
||||
* @pos: the &struct list_head to use as a loop cursor, from where to start
|
||||
* @head: the head for your list.
|
||||
*/
|
||||
#define list_for_each_from(pos, head) \
|
||||
for (; prefetch(pos->next), pos != (head); pos = pos->next)
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user