swh:1:snp:77163734605b0ec556b01d897b7bb4a7e30d46b6
Raw File
Tip revision: 6a13feb9c82803e2b815eca72fa7a9f5561d7861 authored by Linus Torvalds on 02 November 2015, 00:05:25 UTC
Linux 4.3
Tip revision: 6a13feb
list.h
#include <linux/kernel.h>
#include <linux/types.h>

#include "../../../include/linux/list.h"

#ifndef TOOLS_LIST_H
#define TOOLS_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 (; pos != (head); pos = pos->next)
#endif
back to top