]>
Commit | Line | Data |
---|---|---|
361c99a6 | 1 | #include <linux/kernel.h> |
5da50258 ACM |
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 | } | |
43730982 ACM |
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) \ | |
268bb0ce | 26 | for (; pos != (head); pos = pos->next) |
5da50258 | 27 | #endif |