Home | History | Annotate | Download | only in linux
      1 /* ANDROID_CHANGE_BEGIN */
      2 #if 0
      3 #include <linux/kernel.h>
      4 #include <linux/prefetch.h>
      5 #include "../../../../include/linux/list.h"
      6 #else
      7 #include "kernel.h"
      8 #include "prefetch.h"
      9 #include "types.h"
     10 #include "added/list.h"
     11 #endif
     12 /* ANDROID_CHANGE_END */
     13 
     14 #ifndef PERF_LIST_H
     15 #define PERF_LIST_H
     16 /**
     17  * list_del_range - deletes range of entries from list.
     18  * @begin: first element in the range to delete from the list.
     19  * @end: last element in the range to delete from the list.
     20  * Note: list_empty on the range of entries does not return true after this,
     21  * the entries is in an undefined state.
     22  */
     23 static inline void list_del_range(struct list_head *begin,
     24 				  struct list_head *end)
     25 {
     26 	begin->prev->next = end->next;
     27 	end->next->prev = begin->prev;
     28 }
     29 
     30 /**
     31  * list_for_each_from	-	iterate over a list from one of its nodes
     32  * @pos:  the &struct list_head to use as a loop cursor, from where to start
     33  * @head: the head for your list.
     34  */
     35 #define list_for_each_from(pos, head) \
     36 	for (; pos != (head); pos = pos->next)
     37 #endif
     38