Lines Matching refs:head

84  * @head:	struct plist_head variable name
86 #define PLIST_HEAD_INIT(head) \
88 .node_list = LIST_HEAD_INIT((head).node_list) \
93 * @head: name for struct plist_head variable
95 #define PLIST_HEAD(head) \
96 struct plist_head head = PLIST_HEAD_INIT(head)
112 * @head: &struct plist_head pointer
115 plist_head_init(struct plist_head *head)
117 INIT_LIST_HEAD(&head->node_list);
132 extern void plist_add(struct plist_node *node, struct plist_head *head);
133 extern void plist_del(struct plist_node *node, struct plist_head *head);
135 extern void plist_requeue(struct plist_node *node, struct plist_head *head);
140 * @head: the head for your list
142 #define plist_for_each(pos, head) \
143 list_for_each_entry(pos, &(head)->node_list, node_list)
148 * @head: the head for your list
152 #define plist_for_each_continue(pos, head) \
153 list_for_each_entry_continue(pos, &(head)->node_list, node_list)
159 * @head: the head for your list
163 #define plist_for_each_safe(pos, n, head) \
164 list_for_each_entry_safe(pos, n, &(head)->node_list, node_list)
169 * @head: the head for your list
172 #define plist_for_each_entry(pos, head, mem) \
173 list_for_each_entry(pos, &(head)->node_list, mem.node_list)
178 * @head: the head for your list
184 #define plist_for_each_entry_continue(pos, head, m) \
185 list_for_each_entry_continue(pos, &(head)->node_list, m.node_list)
191 * @head: the head for your list
196 #define plist_for_each_entry_safe(pos, n, head, m) \
197 list_for_each_entry_safe(pos, n, &(head)->node_list, m.node_list)
201 * @head: &struct plist_head pointer
203 static inline int plist_head_empty(const struct plist_head *head)
205 return list_empty(&head->node_list);
221 * @head: the &struct plist_head pointer
226 # define plist_first_entry(head, type, member) \
228 WARN_ON(plist_head_empty(head)); \
229 container_of(plist_first(head), type, member); \
232 # define plist_first_entry(head, type, member) \
233 container_of(plist_first(head), type, member)
238 * @head: the &struct plist_head pointer
243 # define plist_last_entry(head, type, member) \
245 WARN_ON(plist_head_empty(head)); \
246 container_of(plist_last(head), type, member); \
249 # define plist_last_entry(head, type, member) \
250 container_of(plist_last(head), type, member)
269 * @head: the &struct plist_head pointer
273 static inline struct plist_node *plist_first(const struct plist_head *head)
275 return list_entry(head->node_list.next,
281 * @head: the &struct plist_head pointer
285 static inline struct plist_node *plist_last(const struct plist_head *head)
287 return list_entry(head->node_list.prev,