Lines Matching refs:list
1 /* Doubly linked list macros compatible with Linux kernel's version
25 /* one-shot definition of a list head */
29 /* initialize a list head explicitly */
46 /* list_for_each - iterate over the linked list
48 * @list: list_head pointer containing the list
50 #define list_for_each(p, list) \
51 for (p = (list)->next; p != (list); p = p->next)
53 /* list_for_each_safe - iterate over the linked list, safe to delete
56 * @list: list_head pointer containing the list
58 #define list_for_each_safe(p, s, list) \
59 for (p = (list)->next; s = p->next, p != (list); p = s)
61 /* list_add - prepend a list entry at the head
62 * @p: the new list entry to add
63 * @list: the list head
65 static inline void list_add(struct list_head *p, struct list_head *list)
67 struct list_head *first = list->next;
71 list->next = p;
72 p->prev = list;
75 /* list_add_tail - append a list entry at the tail
76 * @p: the new list entry to add
77 * @list: the list head
79 static inline void list_add_tail(struct list_head *p, struct list_head *list)
81 struct list_head *last = list->prev;
85 p->next = list;
86 list->prev = p;
89 /* list_insert - insert a new list entry between two known consecutive entries
104 /* list_del - delete the given list entry */
111 /* list_empty - returns 1 if the given list is empty */