tools: Consolidate types.h
[deliverable/linux.git] / tools / perf / util / include / linux / list.h
CommitLineData
361c99a6 1#include <linux/kernel.h>
d944c4ee 2#include <linux/types.h>
3ac1bbcf 3
5da50258
ACM
4#include "../../../../include/linux/list.h"
5
6#ifndef PERF_LIST_H
7#define PERF_LIST_H
8/**
9 * list_del_range - deletes range of entries from list.
10 * @begin: first element in the range to delete from the list.
11 * @end: last element in the range to delete from the list.
12 * Note: list_empty on the range of entries does not return true after this,
13 * the entries is in an undefined state.
14 */
15static inline void list_del_range(struct list_head *begin,
16 struct list_head *end)
17{
18 begin->prev->next = end->next;
19 end->next->prev = begin->prev;
20}
43730982
ACM
21
22/**
23 * list_for_each_from - iterate over a list from one of its nodes
24 * @pos: the &struct list_head to use as a loop cursor, from where to start
25 * @head: the head for your list.
26 */
27#define list_for_each_from(pos, head) \
268bb0ce 28 for (; pos != (head); pos = pos->next)
5da50258 29#endif
This page took 0.25955 seconds and 5 git commands to generate.