Lines Matching defs:pending

129  * 2:1 balanced merges.  Given two pending sublists of size 2^k, they are
139 * pending lists. This is beautifully simple code, but rather subtle.
147 * 2^k, which is when we have 2^k elements pending in smaller lists,
152 * a third list of size 2^(k+1), so there are never more than two pending.
154 * The number of pending lists of size 2^k is determined by the
163 * 0: 00x: 0 pending of size 2^k; x pending of sizes < 2^k
164 * 1: 01x: 0 pending of size 2^k; 2^(k-1) + x pending of sizes < 2^k
165 * 2: x10x: 0 pending of size 2^k; 2^k + x pending of sizes < 2^k
166 * 3: x11x: 1 pending of size 2^k; 2^(k-1) + x pending of sizes < 2^k
167 * 4: y00x: 1 pending of size 2^k; 2^k + x pending of sizes < 2^k
168 * 5: y01x: 2 pending of size 2^k; 2^(k-1) + x pending of sizes < 2^k
177 * When we reach the end of the input, we merge all the pending
186 struct list_head *list = head->next, *pending = NULL;
187 size_t count = 0; /* Count of pending */
199 * - pending is a prev-linked "list of lists" of sorted
204 * - A pair of pending sublists are merged as soon as the number
205 * of following pending elements equals their size (i.e.
215 struct list_head **tail = &pending;
230 /* Move one element from input list to pending */
231 list->prev = pending;
232 pending = list;
234 pending->next = NULL;
238 /* End of input; merge together all the pending lists. */
239 list = pending;
240 pending = pending->prev;
242 struct list_head *next = pending->prev;
246 list = merge(priv, cmp, pending, list);
247 pending = next;
250 merge_final(priv, cmp, head, pending, list);