diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-06 15:51:12 -0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2010-08-06 15:51:12 -0400 |
commit | 43730982c3e9355dd8bd6b31f0a0a3508ad4209d (patch) | |
tree | a6f05a4fc0ff118745d1000c535e506321510bd9 /tools/perf/util/include | |
parent | 449e5b247ca7c9dc9fc3391b7eebfefdeb2ce1fc (diff) |
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>
Diffstat (limited to 'tools/perf/util/include')
-rw-r--r-- | tools/perf/util/include/linux/list.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/perf/util/include/linux/list.h b/tools/perf/util/include/linux/list.h index dbe4b814382a..f5ca26e53fbb 100644 --- a/tools/perf/util/include/linux/list.h +++ b/tools/perf/util/include/linux/list.h | |||
@@ -15,4 +15,12 @@ static inline void list_del_range(struct list_head *begin, | |||
15 | begin->prev->next = end->next; | 15 | begin->prev->next = end->next; |
16 | end->next->prev = begin->prev; | 16 | end->next->prev = begin->prev; |
17 | } | 17 | } |
18 | |||
19 | /** | ||
20 | * list_for_each_from - iterate over a list from one of its nodes | ||
21 | * @pos: the &struct list_head to use as a loop cursor, from where to start | ||
22 | * @head: the head for your list. | ||
23 | */ | ||
24 | #define list_for_each_from(pos, head) \ | ||
25 | for (; prefetch(pos->next), pos != (head); pos = pos->next) | ||
18 | #endif | 26 | #endif |