Lines Matching refs:head
95 #define PLIST_HEAD_INIT(head) \ argument
97 .node_list = LIST_HEAD_INIT((head).node_list) \
117 plist_head_init(struct plist_head *head) in plist_head_init() argument
119 INIT_LIST_HEAD(&head->node_list); in plist_head_init()
134 extern void plist_add(struct plist_node *node, struct plist_head *head);
135 extern void plist_del(struct plist_node *node, struct plist_head *head);
142 #define plist_for_each(pos, head) \ argument
143 list_for_each_entry(pos, &(head)->node_list, node_list)
153 #define plist_for_each_safe(pos, n, head) \ argument
154 list_for_each_entry_safe(pos, n, &(head)->node_list, node_list)
162 #define plist_for_each_entry(pos, head, mem) \ argument
163 list_for_each_entry(pos, &(head)->node_list, mem.node_list)
174 #define plist_for_each_entry_safe(pos, n, head, m) \ argument
175 list_for_each_entry_safe(pos, n, &(head)->node_list, m.node_list)
181 static inline int plist_head_empty(const struct plist_head *head) in plist_head_empty() argument
183 return list_empty(&head->node_list); in plist_head_empty()
204 # define plist_first_entry(head, type, member) \ argument
206 WARN_ON(plist_head_empty(head)); \
207 container_of(plist_first(head), type, member); \
210 # define plist_first_entry(head, type, member) \ argument
211 container_of(plist_first(head), type, member)
221 # define plist_last_entry(head, type, member) \ argument
223 WARN_ON(plist_head_empty(head)); \
224 container_of(plist_last(head), type, member); \
227 # define plist_last_entry(head, type, member) \ argument
228 container_of(plist_last(head), type, member)
237 static inline struct plist_node *plist_first(const struct plist_head *head) in plist_first() argument
239 return list_entry(head->node_list.next, in plist_first()
249 static inline struct plist_node *plist_last(const struct plist_head *head) in plist_last() argument
251 return list_entry(head->node_list.prev, in plist_last()