Lines Matching refs:list

20  *       list.h
23 * This code was kindly borrowed from linux/include/linux/list.h
26 * access the container of the list from the list_head struct.
45 * non-initialized list entries.
51 * Simple doubly linked list implementation.
69 static inline void INIT_LIST_HEAD(struct list_head *list)
71 list->next = list;
72 list->prev = list;
78 * This is only for internal list manipulation where we know
94 * @head: list head to add it after
107 * @head: list head to add it before
118 * Delete a list entry by making the prev/next entries
121 * This is only for internal list manipulation where we know
131 * list_del - deletes entry from list.
132 * @entry: the element to delete from the list.
144 * list_del_init - deletes entry from list and reinitialize it.
145 * @entry: the element to delete from the list.
154 * list_move - delete from one list and add as another's head
155 * @list: the entry to move
158 static inline void list_move(struct list_head *list, struct list_head *head)
160 __list_del(list->prev, list->next);
161 list_add(list, head);
165 * list_move_tail - delete from one list and add as another's tail
166 * @list: the entry to move
169 static inline void list_move_tail(struct list_head *list,
172 __list_del(list->prev, list->next);
173 list_add_tail(list, head);
177 * list_empty - tests whether a list is empty
178 * @head: the list to test.
186 * list_empty_careful - tests whether a list is
192 * to the list entry is list_del_init(). Eg. it cannot be used
195 * @head: the list to test.
203 static inline void __list_splice(struct list_head *list,
206 struct list_head *first = list->next;
207 struct list_head *last = list->prev;
219 * @list: the new list to add.
220 * @head: the place to add it in the first list.
222 static inline void list_splice(struct list_head *list, struct list_head *head)
224 if (!list_empty(list))
225 __list_splice(list, head);
229 * list_splice_init - join two lists and reinitialise the emptied list.
230 * @list: the new list to add.
231 * @head: the place to add it in the first list.
233 * The list at @list is reinitialised
235 static inline void list_splice_init(struct list_head *list,
238 if (!list_empty(list)) {
239 __list_splice(list, head);
240 INIT_LIST_HEAD(list);
267 * list_for_each - iterate over a list
269 * @head: the head for your list.
276 * list_for_each_prev - iterate over a list backwards
278 * @head: the head for your list.
285 * list_for_each_safe - iterate over a list safe against removal of list entry
288 * @head: the head for your list.
295 * list_for_each_entry - iterate over list of given type
297 * @head: the head for your list.
306 * list_for_each_entry_reverse - iterate backwards over list of given type.
308 * @head: the head for your list.
320 * @head: the head of the list
327 * list_for_each_entry_continue - iterate over list of given type
330 * @head: the head for your list.
339 * list_for_each_entry_safe - iterate over list of given type safe against removal of list entry
342 * @head: the head for your list.
352 * list_for_each_entry_safe_continue - iterate over list of given type
353 * continuing after existing point safe against removal of list entry
356 * @head: the head for your list.
366 * list_for_each_entry_safe_reverse - iterate backwards over list of given type safe against
367 * removal of list entry
370 * @head: the head for your list.