Lines Matching refs:head
64 * @head: list head to add it after
66 * Insert a new entry after the specified head.
69 static inline void list_add(struct list_head *new, struct list_head *head)
71 __list_add(new, head, head->next);
77 * @head: list head to add it before
79 * Insert a new entry before the specified head.
82 static inline void list_add_tail(struct list_head *new, struct list_head *head)
84 __list_add(new, head->prev, head);
124 * list_move - delete from one list and add as another's head
126 * @head: the head that will precede our entry
128 static inline void list_move(struct list_head *list, struct list_head *head)
131 list_add(list, head);
137 * @head: the head that will follow our entry
140 struct list_head *head)
143 list_add_tail(list, head);
148 * @head: the list to test.
150 static inline int list_empty(const struct list_head *head)
152 return head->next == head;
156 struct list_head *head)
160 struct list_head *at = head->next;
162 first->prev = head;
163 head->next = first;
172 * @head: the place to add it in the first list.
174 static inline void list_splice(struct list_head *list, struct list_head *head)
177 __list_splice(list, head);
183 * @head: the place to add it in the first list.
188 struct list_head *head)
191 __list_splice(list, head);
208 * @head: the head for your list.
211 #define list_for_each(pos, head) \
212 for (pos = (head)->next; pos != (head); \
218 * @head: the head for your list.
225 #define __list_for_each(pos, head) \
226 for (pos = (head)->next; pos != (head); pos = pos->next)
231 * @head: the head for your list.
233 #define list_for_each_prev(pos, head) \
234 for (pos = (head)->prev; prefetch(pos->prev), pos != (head); \
241 * @head: the head for your list.
243 #define list_for_each_safe(pos, n, head) \
244 for (pos = (head)->next, n = pos->next; pos != (head); \
250 * @head: the head for your list.
253 #define list_for_each_entry(pos, head, member) \
254 for (pos = list_entry((head)->next, typeof(*pos), member); \
255 &pos->member != (head); \
261 * @head: the head for your list.
264 #define list_for_each_entry_reverse(pos, head, member) \
265 for (pos = list_entry((head)->prev, typeof(*pos), member); \
266 &pos->member != (head); \
273 * @head: the head of the list
276 #define list_prepare_entry(pos, head, member) \
277 ((pos) ? : list_entry(head, typeof(*pos), member))
283 * @head: the head for your list.
286 #define list_for_each_entry_continue(pos, head, member) \
288 &pos->member != (head); \
296 * @head: the head for your list.
299 #define list_for_each_entry_safe(pos, n, head, member) \
300 for (pos = list_entry((head)->next, typeof(*pos), member), \
302 &pos->member != (head); \
310 * @head: the head for your list.
313 #define list_for_each_entry_safe_continue(pos, n, head, member) \
316 &pos->member != (head); \
324 * @head: the head for your list.
327 #define list_for_each_entry_safe_reverse(pos, n, head, member) \
328 for (pos = list_entry((head)->prev, typeof(*pos), member), \
330 &pos->member != (head); \