Lines Matching full:head

76  * @head: list head to add it after
78 * Insert a new entry after the specified head.
81 static inline void list_add(struct list_head *new, struct list_head *head) in list_add() argument
83 __list_add(new, head, head->next); in list_add()
89 * @head: list head to add it before
91 * Insert a new entry before the specified head.
94 static inline void list_add_tail(struct list_head *new, struct list_head *head) in list_add_tail() argument
96 __list_add(new, head->prev, head); in list_add_tail()
161 * list_move - delete from one list and add as another's head
163 * @head: the head that will precede our entry
165 static inline void list_move(struct list_head *list, struct list_head *head) in list_move() argument
168 list_add(list, head); in list_move()
174 * @head: the head that will follow our entry
177 struct list_head *head) in list_move_tail() argument
180 list_add_tail(list, head); in list_move_tail()
184 * list_is_first -- tests whether @list is the first entry in list @head
186 * @head: the head of the list
188 static inline int list_is_first(const struct list_head *list, const struct list_head *head) in list_is_first() argument
190 return list->prev == head; in list_is_first()
194 * list_is_last - tests whether @list is the last entry in list @head
196 * @head: the head of the list
198 static inline int list_is_last(const struct list_head *list, const struct list_head *head) in list_is_last() argument
200 return list->next == head; in list_is_last()
204 * list_is_head - tests whether @list is the list @head
206 * @head: the head of the list
208 static inline int list_is_head(const struct list_head *list, const struct list_head *head) in list_is_head() argument
210 return list == head; in list_is_head()
215 * @head: the list to test.
217 static inline int list_empty(const struct list_head *head) in list_empty() argument
219 return head->next == head; in list_empty()
233 * @ptr: the list head to take the element from.
244 * @ptr: the list head to take the element from.
270 * list_entry_is_head - test if the entry points to the head of the list
272 * @head: the head for your list.
275 #define list_entry_is_head(pos, head, member) \ argument
276 (&pos->member == (head))
281 * @head: the head for your list.
284 #define list_for_each_entry(pos, head, member) \ argument
285 for (pos = list_first_entry(head, typeof(*pos), member); \
286 !list_entry_is_head(pos, head, member); \
292 * @head: the head for your list.
295 #define list_for_each_entry_reverse(pos, head, member) \ argument
296 for (pos = list_last_entry(head, typeof(*pos), member); \
297 !list_entry_is_head(pos, head, member); \
304 * @head: the head for your list.
307 #define list_for_each_entry_safe(pos, n, head, member) \ argument
308 for (pos = list_first_entry(head, typeof(*pos), member), \
310 !list_entry_is_head(pos, head, member); \
314 * Double linked lists with a single pointer list head.
315 * Mostly useful for hash tables where the two pointer list head is
382 * @h: hlist head to add it after
384 * Insert a new entry after the specified head.
408 * @head: the head for your list.
411 #define hlist_for_each_entry(pos, head, member) \ argument
412 for (pos = hlist_entry_safe((head)->first, typeof(*(pos)), member);\
420 * @head: the head for your list.
423 #define hlist_for_each_entry_safe(pos, n, head, member) \ argument
424 for (pos = hlist_entry_safe((head)->first, typeof(*pos), member);\