30 #ifdef CONFIG_DEBUG_PI_LIST
38 "top: %p, n: %p, p: %p\n"
39 "prev: %p, n: %p, p: %p\n"
40 "next: %p, n: %p, p: %p\n",
50 plist_check_prev_next(top, prev, next);
54 plist_check_prev_next(top, prev, next);
60 if (!plist_head_empty(head))
61 plist_check_list(&plist_first(head)->prio_list);
66 # define plist_check_head(h) do { } while (0)
81 WARN_ON(!plist_node_empty(node));
84 if (plist_head_empty(head))
87 first = iter = plist_first(head);
98 }
while (iter != first);
100 if (!prev || prev->
prio != node->
prio)
137 #ifdef CONFIG_DEBUG_PI_LIST
138 #include <linux/sched.h>
139 #include <linux/module.h>
144 static void __init plist_test_check(
int nr_expect)
148 if (plist_head_empty(&test_head)) {
153 prio_pos = first = plist_first(&test_head);
157 if (node_pos == first)
159 if (node_pos->
prio == prio_pos->
prio) {
173 static int __init plist_test(
void)
175 int nr_expect = 0,
i, loop;
179 plist_head_init(&test_head);
183 for (loop = 0; loop < 1000; loop++) {
184 r = r * 193939 % 47629;
187 r = r * 193939 % 47629;
195 plist_test_check(nr_expect);
203 plist_test_check(nr_expect);