Path: blob/master/tools/perf/util/include/linux/list.h
10825 views
#include <linux/kernel.h>1#include <linux/prefetch.h>23#include "../../../../include/linux/list.h"45#ifndef PERF_LIST_H6#define PERF_LIST_H7/**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*/14static inline void list_del_range(struct list_head *begin,15struct list_head *end)16{17begin->prev->next = end->next;18end->next->prev = begin->prev;19}2021/**22* list_for_each_from - iterate over a list from one of its nodes23* @pos: the &struct list_head to use as a loop cursor, from where to start24* @head: the head for your list.25*/26#define list_for_each_from(pos, head) \27for (; pos != (head); pos = pos->next)28#endif293031