Lines Matching defs:cmp
16 static struct list_head *merge(void *priv, list_cmp_func_t cmp,
23 if (cmp(priv, a, b) <= 0) {
52 static void merge_final(void *priv, list_cmp_func_t cmp, struct list_head *head,
60 if (cmp(priv, a, b) <= 0) {
86 * element comparison is needed, so the client's cmp()
90 cmp(priv, b, b);
103 * @priv: private data, opaque to list_sort(), passed to @cmp
105 * @cmp: the elements comparison function
107 * The comparison function @cmp must return > 0 if @a should sort after
114 * This is compatible with two styles of @cmp function:
185 void list_sort(void *priv, struct list_head *head, list_cmp_func_t cmp)
225 a = merge(priv, cmp, b, a);
247 list = merge(priv, cmp, pending, list);
251 merge_final(priv, cmp, head, pending, list);