Merge branch 'for-paul' of git://gitorious.org/linux-omap-dss2/linux
[pandora-kernel.git] / tools / perf / util / include / linux / list.h
1 #include <linux/kernel.h>
2 #include "../../../../include/linux/list.h"
3
4 #ifndef PERF_LIST_H
5 #define PERF_LIST_H
6 /**
7  * list_del_range - deletes range of entries from list.
8  * @begin: first element in the range to delete from the list.
9  * @end: last element in the range to delete from the list.
10  * Note: list_empty on the range of entries does not return true after this,
11  * the entries is in an undefined state.
12  */
13 static inline void list_del_range(struct list_head *begin,
14                                   struct list_head *end)
15 {
16         begin->prev->next = end->next;
17         end->next->prev = begin->prev;
18 }
19
20 /**
21  * list_for_each_from   -       iterate over a list from one of its nodes
22  * @pos:  the &struct list_head to use as a loop cursor, from where to start
23  * @head: the head for your list.
24  */
25 #define list_for_each_from(pos, head) \
26         for (; prefetch(pos->next), pos != (head); pos = pos->next)
27 #endif