Lines Matching defs:cmp
15 static struct list_head *merge(void *priv, list_cmp_func_t cmp,
22 if (cmp(priv, a, b) <= 0) {
51 static void merge_final(void *priv, list_cmp_func_t cmp, struct list_head *head,
59 if (cmp(priv, a, b) <= 0) {
85 * element comparison is needed, so the client's cmp()
89 cmp(priv, b, b);
102 * @priv: private data, opaque to list_sort(), passed to @cmp
104 * @cmp: the elements comparison function
106 * The comparison function @cmp must return > 0 if @a should sort after
113 * This is compatible with two styles of @cmp function:
184 void list_sort(void *priv, struct list_head *head, list_cmp_func_t cmp)
224 a = merge(priv, cmp, b, a);
246 list = merge(priv, cmp, pending, list);
250 merge_final(priv, cmp, head, pending, list);