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