History

tools: Move tools/perf/util/include/linux/{list.h,poison.h} to tools/include

This patch moves list.h from tools/perf/util/include/linux/list.h to tools/include/linux/list.h to enable other libraries use macros in it, like libbpf which will be introduced by further patches. Since list.h depend on poison.h, poison.h is also moved. Both file use relative path, so one '..' is removed for each header to make them suit for new directory. MANIFEST is also updated for 'make perf-*-src-pkg'.

Wang Nan committed 11 years ago

Commit 4fc62a81 parent 37fbe0a4 files · +6 −4Browse files

Showing the changes to tools/include/linux (2 of 4 files). Show all

Unified · Split

2 files
  1. tools/include/linux/list.h +29 −0
  2. tools/include/linux/poison.h +1 −0
tools/include/linux/list.h+29−0
@@ -0,0 +1,29 @@
1#include <linux/kernel.h>
2#include <linux/types.h>
3
4#include "../../../include/linux/list.h"
5
6#ifndef TOOLS_LIST_H
7#define TOOLS_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}
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) \
28 for (; pos != (head); pos = pos->next)
29#endif
tools/include/linux/poison.h+1−0
@@ -0,0 +1 @@
1#include "../../../include/linux/poison.h"