Home | History | Annotate | Download | only in include

Lines Matching refs:head

94  * @head: list head to add it after
96 * Insert a new entry after the specified head.
99 static inline void list_add(struct list_head *new, struct list_head *head)
101 __list_add(new, head, head->next);
107 * @head: list head to add it before
109 * Insert a new entry before the specified head.
112 static inline void list_add_tail(struct list_head *new, struct list_head *head)
114 __list_add(new, head->prev, head);
154 * list_move - delete from one list and add as another's head
156 * @head: the head that will precede our entry
158 static inline void list_move(struct list_head *list, struct list_head *head)
161 list_add(list, head);
167 * @head: the head that will follow our entry
170 struct list_head *head)
173 list_add_tail(list, head);
178 * @head: the list to test.
180 static inline int list_empty(const struct list_head *head)
182 return head->next == head;
195 * @head: the list to test.
197 static inline int list_empty_careful(const struct list_head *head)
199 struct list_head *next = head->next;
200 return (next == head) && (next == head->prev);
204 struct list_head *head)
208 struct list_head *at = head->next;
210 first->prev = head;
211 head->next = first;
220 * @head: the place to add it in the first list.
222 static inline void list_splice(struct list_head *list, struct list_head *head)
225 __list_splice(list, head);
231 * @head: the place to add it in the first list.
236 struct list_head *head)
239 __list_splice(list, head);
269 * @head: the head for your list.
271 #define list_for_each(pos, head) \
272 for (pos = (head)->next; pos != (head); \
278 * @head: the head for your list.
280 #define list_for_each_prev(pos, head) \
281 for (pos = (head)->prev; pos != (head); \
288 * @head: the head for your list.
290 #define list_for_each_safe(pos, n, head) \
291 for (pos = (head)->next, n = pos->next; pos != (head); \
297 * @head: the head for your list.
300 #define list_for_each_entry(pos, head, member) \
301 for (pos = list_entry((head)->next, typeof(*pos), member); \
302 &pos->member != (head); \
308 * @head: the head for your list.
311 #define list_for_each_entry_reverse(pos, head, member) \
312 for (pos = list_entry((head)->prev, typeof(*pos), member); \
313 &pos->member != (head); \
320 * @head: the head of the list
323 #define list_prepare_entry(pos, head, member) \
324 ((pos) ? : list_entry(head, typeof(*pos), member))
330 * @head: the head for your list.
333 #define list_for_each_entry_continue(pos, head, member) \
335 &pos->member != (head); \
342 * @head: the head for your list.
345 #define list_for_each_entry_safe(pos, n, head, member) \
346 for (pos = list_entry((head)->next, typeof(*pos), member), \
348 &pos->member != (head); \
356 * @head: the head for your list.
359 #define list_for_each_entry_safe_continue(pos, n, head, member) \
362 &pos->member != (head); \
370 * @head: the head for your list.
373 #define list_for_each_entry_safe_reverse(pos, n, head, member) \
374 for (pos = list_entry((head)->prev, typeof(*pos), member), \
376 &pos->member != (head); \