Lines Matching full:list
26 /* Modified by Ben Skeggs <bskeggs@redhat.com> to match kernel list APIs */
32 * @file Classic doubly-link circular list implementation.
33 * For real usage examples of the linked list, see the file test/list.c
36 * We need to keep a list of struct foo in the parent struct bar, i.e. what
45 * We need one list head in bar and a list element in all list_of_foos (both are of
60 * Now we initialize the list head:
66 * Then we create the first element and add it to this list:
72 * Repeat the above for each element you want to add to the list. Deleting
78 * list again.
80 * Looping through the list requires a 'struct foo' as iterator and the
101 * The linkage struct for list nodes. This struct must be part of your
103 * list and for each list node.
106 * There are no requirements that elements of a list are of the same type.
107 * There are no requirements for a list head, any struct list_head can be a list
115 * Initialize the list as an empty list.
120 * @param The list to initialized.
128 INIT_LIST_HEAD(struct list_head *list) in INIT_LIST_HEAD() argument
130 list->next = list->prev = list; in INIT_LIST_HEAD()
144 * Insert a new element after the given list head. The new element does not
145 * need to be initialised as empty list.
146 * The list changes from:
155 * @param entry The new element to prepend to the list.
156 * @param head The existing list.
165 * Append a new element to the end of the list given with this list head.
167 * The list changes from:
176 * @param entry The new element to prepend to the list.
177 * @param head The existing list.
193 * Remove the element from the list it is in. Using this function will reset
194 * the pointers to/from this element so it is removed from the list. It does
197 * Using list_del on a pure list head (like in the example at the top of
199 * the list but rather reset the list as empty list.
219 static inline void list_move_tail(struct list_head *list, in list_move_tail() argument
222 __list_del(list->prev, list->next); in list_move_tail()
223 list_add_tail(list, head); in list_move_tail()
227 * Check if the list is empty.
232 * @return True if the list contains one or more elements or False otherwise.
241 * Returns a pointer to the container of this list element.
249 * @param type Data type of the list element.
250 * @param member Member name of the struct list_head field in the list element.
251 * @return A pointer to the data struct containing the list head.
265 * Retrieve the first list entry for the given list pointer.
271 * @param ptr The list head
272 * @param type Data type of the list element to retrieve
273 * @param member Member name of the struct list_head field in the list element.
274 * @return A pointer to the first list element.
280 * Retrieve the last list entry for the given listpointer.
286 * @param ptr The list head
287 * @param type Data type of the list element to retrieve
288 * @param member Member name of the struct list_head field in the list element.
289 * @return A pointer to the last list element.
298 * Loop through the list given by head and set pos to struct in the list.
309 * @param pos Iterator variable of the type of the list elements.
310 * @param head List head
311 * @param member Member name of the struct list_head in the list elements.
320 * Loop through the list, keeping a backup pointer to the element. This
321 * macro allows for the deletion of a list element while looping through the
322 * list.