
Killing two more perf wide global variables: nr_counters and evsel_list as a list_head. There are more operations that will need more fields in perf_evlist, like the pollfd for polling all the fds in a list of evsel instances. Use option->value to pass the evsel_list to parse_{events,filters}. LKML-Reference: <new-submission> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Mike Galbraith <efault@gmx.de> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Stephane Eranian <eranian@google.com> Cc: Tom Zanussi <tzanussi@gmail.com> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
28 lines
866 B
C
28 lines
866 B
C
#include <linux/kernel.h>
|
|
#include "../../../../include/linux/list.h"
|
|
|
|
#ifndef PERF_LIST_H
|
|
#define PERF_LIST_H
|
|
/**
|
|
* list_del_range - deletes range of entries from list.
|
|
* @begin: first element in the range to delete from the list.
|
|
* @end: last element in the range to delete from the list.
|
|
* Note: list_empty on the range of entries does not return true after this,
|
|
* the entries is in an undefined state.
|
|
*/
|
|
static inline void list_del_range(struct list_head *begin,
|
|
struct list_head *end)
|
|
{
|
|
begin->prev->next = end->next;
|
|
end->next->prev = begin->prev;
|
|
}
|
|
|
|
/**
|
|
* list_for_each_from - iterate over a list from one of its nodes
|
|
* @pos: the &struct list_head to use as a loop cursor, from where to start
|
|
* @head: the head for your list.
|
|
*/
|
|
#define list_for_each_from(pos, head) \
|
|
for (; prefetch(pos->next), pos != (head); pos = pos->next)
|
|
#endif
|