Lines Matching refs:head
79 * @head: list head to add it after
81 * Insert a new entry after the specified head.
84 static inline void list_add(struct list_head *new, struct list_head *head)
86 __list_add(new, head, head->next);
92 * @head: list head to add it before
94 * Insert a new entry before the specified head.
97 static inline void list_add_tail(struct list_head *new, struct list_head *head)
99 __list_add(new, head->prev, head);
134 * list_is_head - tests whether @list is the list @head
136 * @head: the head of the list
138 static inline int list_is_head(const struct list_head *list, const struct list_head *head)
140 return list == head;
145 * @head: the list to test.
147 static inline int list_empty(const struct list_head *head)
149 return head->next == head;
163 * @ptr: the list head to take the element from.
181 * list_entry_is_head - test if the entry points to the head of the list
183 * @head: the head for your list.
186 #define list_entry_is_head(pos, head, member) \
187 (&pos->member == (head))
192 * @head: the head for your list.
195 #define list_for_each_entry(pos, head, member) \
196 for (pos = list_first_entry(head, typeof(*pos), member); \
197 !list_entry_is_head(pos, head, member); \
204 * @head: the head for your list.
207 #define list_for_each_entry_safe(pos, n, head, member) \
208 for (pos = list_first_entry(head, typeof(*pos), member), \
210 !list_entry_is_head(pos, head, member); \