Go to the documentation of this file.
75 #ifndef _LINUX_PLIST_H_
76 #define _LINUX_PLIST_H_
78 #include <linux/kernel.h>
79 #include <linux/list.h>
95 #define PLIST_HEAD_INIT(head) \
97 .node_list = LIST_HEAD_INIT((head).node_list) \
105 #define PLIST_NODE_INIT(node, __prio) \
108 .prio_list = LIST_HEAD_INIT((node).prio_list), \
109 .node_list = LIST_HEAD_INIT((node).node_list), \
142 #define plist_for_each(pos, head) \
143 list_for_each_entry(pos, &(head)->node_list, node_list)
153 #define plist_for_each_safe(pos, n, head) \
154 list_for_each_entry_safe(pos, n, &(head)->node_list, node_list)
162 #define plist_for_each_entry(pos, head, mem) \
163 list_for_each_entry(pos, &(head)->node_list, mem.node_list)
174 #define plist_for_each_entry_safe(pos, n, head, m) \
175 list_for_each_entry_safe(pos, n, &(head)->node_list, m.node_list)
203 #ifdef CONFIG_DEBUG_PI_LIST
204 # define plist_first_entry(head, type, member) \
206 WARN_ON(plist_head_empty(head)); \
207 container_of(plist_first(head), type, member); \
210 # define plist_first_entry(head, type, member) \
211 container_of(plist_first(head), type, member)
220 #ifdef CONFIG_DEBUG_PI_LIST
221 # define plist_last_entry(head, type, member) \
223 WARN_ON(plist_head_empty(head)); \
224 container_of(plist_last(head), type, member); \
227 # define plist_last_entry(head, type, member) \
228 container_of(plist_last(head), type, member)