Lines Matching full:merge
9 * to chaining of merge() calls: null-terminated, no reserved or
13 static struct list_head *merge(void *priv, list_cmp_func_t cmp, in merge() function
42 * Combine final list merge with restoration of standard doubly-linked
43 * list structure. This approach duplicates code from merge(), but
80 * If the merge is highly unbalanced (e.g. the input is in merge_final()
148 * for each bit, when count increments to 2^k), we merge two lists of
151 * This merge happens exactly when the count reaches an odd multiple of
153 * so it's safe to merge away two lists of size 2^k.
174 * (merge and loop back to state 2)
178 * merge them away in the 5->2 transition. Note in particular that just
182 * When we reach the end of the input, we merge all the pending
184 * 5 above, you can see that the number of elements we merge with a list
186 * 2^(k+1) - 1 (second merge of case 5 when x == 2^(k-1) - 1).
212 * That ensures each later final merge will be at worst 2:1. in list_sort()
225 /* Do the indicated merge */ in list_sort()
229 a = merge(priv, cmp, b, a); in list_sort()
243 /* End of input; merge together all the pending lists. */ in list_sort()
251 list = merge(priv, cmp, pending, list); in list_sort()
254 /* The final merge, rebuilding prev links */ in list_sort()