Contributors: 7
Author |
Tokens |
Token Proportion |
Commits |
Commit Proportion |
Matt Mackall |
64 |
56.64% |
1 |
12.50% |
Rasmus Villemoes |
18 |
15.93% |
1 |
12.50% |
Andy Shevchenko |
14 |
12.39% |
1 |
12.50% |
Kent Overstreet |
12 |
10.62% |
2 |
25.00% |
Jiri Olsa |
2 |
1.77% |
1 |
12.50% |
Fedor Pchelkin |
2 |
1.77% |
1 |
12.50% |
Greg Kroah-Hartman |
1 |
0.88% |
1 |
12.50% |
Total |
113 |
|
8 |
|
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _LINUX_SORT_H
#define _LINUX_SORT_H
#include <linux/types.h>
/**
* cmp_int - perform a three-way comparison of the arguments
* @l: the left argument
* @r: the right argument
*
* Return: 1 if the left argument is greater than the right one; 0 if the
* arguments are equal; -1 if the left argument is less than the right one.
*/
#define cmp_int(l, r) (((l) > (r)) - ((l) < (r)))
void sort_r(void *base, size_t num, size_t size,
cmp_r_func_t cmp_func,
swap_r_func_t swap_func,
const void *priv);
void sort(void *base, size_t num, size_t size,
cmp_func_t cmp_func,
swap_func_t swap_func);
/* Versions that periodically call cond_resched(): */
void sort_r_nonatomic(void *base, size_t num, size_t size,
cmp_r_func_t cmp_func,
swap_r_func_t swap_func,
const void *priv);
void sort_nonatomic(void *base, size_t num, size_t size,
cmp_func_t cmp_func,
swap_func_t swap_func);
#endif