Lines Matching refs:head

73  * @head: list head to add it after
75 * Insert a new entry after the specified head.
78 static inline void list_add(struct list_head *new, struct list_head *head)
80 __list_add(new, head, head->next);
86 * @head: list head to add it before
88 * Insert a new entry before the specified head.
91 static inline void list_add_tail(struct list_head *new, struct list_head *head)
93 __list_add(new, head->prev, head);
133 * list_move - delete from one list and add as another's head
135 * @head: the head that will precede our entry
137 static inline void list_move(struct list_head *list, struct list_head *head)
140 list_add(list, head);
146 * @head: the head that will follow our entry
149 struct list_head *head)
152 list_add_tail(list, head);
157 * @head: the list to test.
159 static inline int list_empty(struct list_head *head)
161 return head->next == head;
165 struct list_head *head)
169 struct list_head *at = head->next;
171 first->prev = head;
172 head->next = first;
181 * @head: the place to add it in the first list.
183 static inline void list_splice(struct list_head *list, struct list_head *head)
186 __list_splice(list, head);
192 * @head: the place to add it in the first list.
197 struct list_head *head)
200 __list_splice(list, head);
217 * @head: the head for your list.
219 #define list_for_each(pos, head) \
220 for (pos = (head)->next; pos != (head); \
226 * @head: the head for your list.
233 #define __list_for_each(pos, head) \
234 for (pos = (head)->next; pos != (head); pos = pos->next)
239 * @head: the head for your list.
241 #define list_for_each_prev(pos, head) \
242 for (pos = (head)->prev; pos != (head); pos = pos->prev)
248 * @head: the head for your list.
250 #define list_for_each_safe(pos, n, head) \
251 for (pos = (head)->next, n = pos->next; pos != (head); \
257 * @head: the head for your list.
260 #define list_for_each_entry(pos, head, member) \
261 for (pos = list_entry((head)->next, typeof(*pos), member); \
262 &pos->member != (head); \
268 * @head: the head for your list.
271 #define list_for_each_entry_reverse(pos, head, member) \
272 for (pos = list_entry((head)->prev, typeof(*pos), member); \
273 &pos->member != (head); \
280 * @head: the head for your list.
283 #define list_for_each_entry_safe(pos, n, head, member) \
284 for (pos = list_entry((head)->next, typeof(*pos), member), \
286 &pos->member != (head); \