Lines Matching defs:pending

130  * 2:1 balanced merges.  Given two pending sublists of size 2^k, they are
140 * pending lists. This is beautifully simple code, but rather subtle.
148 * 2^k, which is when we have 2^k elements pending in smaller lists,
153 * a third list of size 2^(k+1), so there are never more than two pending.
155 * The number of pending lists of size 2^k is determined by the
164 * 0: 00x: 0 pending of size 2^k; x pending of sizes < 2^k
165 * 1: 01x: 0 pending of size 2^k; 2^(k-1) + x pending of sizes < 2^k
166 * 2: x10x: 0 pending of size 2^k; 2^k + x pending of sizes < 2^k
167 * 3: x11x: 1 pending of size 2^k; 2^(k-1) + x pending of sizes < 2^k
168 * 4: y00x: 1 pending of size 2^k; 2^k + x pending of sizes < 2^k
169 * 5: y01x: 2 pending of size 2^k; 2^(k-1) + x pending of sizes < 2^k
178 * When we reach the end of the input, we merge all the pending
187 struct list_head *list = head->next, *pending = NULL;
188 size_t count = 0; /* Count of pending */
200 * - pending is a prev-linked "list of lists" of sorted
205 * - A pair of pending sublists are merged as soon as the number
206 * of following pending elements equals their size (i.e.
216 struct list_head **tail = &pending;
231 /* Move one element from input list to pending */
232 list->prev = pending;
233 pending = list;
235 pending->next = NULL;
239 /* End of input; merge together all the pending lists. */
240 list = pending;
241 pending = pending->prev;
243 struct list_head *next = pending->prev;
247 list = merge(priv, cmp, pending, list);
248 pending = next;
251 merge_final(priv, cmp, head, pending, list);