Lines Matching refs:head
104 #define PLIST_HEAD_INIT(head, _lock) \ argument
106 .prio_list = LIST_HEAD_INIT((head).prio_list), \
107 .node_list = LIST_HEAD_INIT((head).node_list), \
129 plist_head_init(struct plist_head *head, spinlock_t *lock) in plist_head_init() argument
131 INIT_LIST_HEAD(&head->prio_list); in plist_head_init()
132 INIT_LIST_HEAD(&head->node_list); in plist_head_init()
134 head->lock = lock; in plist_head_init()
150 extern void plist_add(struct plist_node *node, struct plist_head *head);
151 extern void plist_del(struct plist_node *node, struct plist_head *head);
159 #define plist_for_each(pos, head) \ argument
160 list_for_each_entry(pos, &(head)->node_list, plist.node_list)
170 #define plist_for_each_safe(pos, n, head) \ argument
171 list_for_each_entry_safe(pos, n, &(head)->node_list, plist.node_list)
180 #define plist_for_each_entry(pos, head, mem) \ argument
181 list_for_each_entry(pos, &(head)->node_list, mem.plist.node_list)
192 #define plist_for_each_entry_safe(pos, n, head, m) \ argument
193 list_for_each_entry_safe(pos, n, &(head)->node_list, m.plist.node_list)
200 static inline int plist_head_empty(const struct plist_head *head) in plist_head_empty() argument
202 return list_empty(&head->node_list); in plist_head_empty()
225 # define plist_first_entry(head, type, member) \ argument
227 WARN_ON(plist_head_empty(head)); \
228 container_of(plist_first(head), type, member); \
231 # define plist_first_entry(head, type, member) \ argument
232 container_of(plist_first(head), type, member)
242 static inline struct plist_node* plist_first(const struct plist_head *head) in plist_first() argument
244 return list_entry(head->node_list.next, in plist_first()