2017-01-08 12:13:18 +03:00
|
|
|
#ifndef _LINUX_SORT_H
|
|
|
|
#define _LINUX_SORT_H
|
|
|
|
|
2018-12-20 04:34:24 +03:00
|
|
|
#include <stdlib.h>
|
2024-02-10 05:30:46 +03:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
|
|
|
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);
|
2017-01-08 12:13:18 +03:00
|
|
|
|
2018-12-20 04:34:24 +03:00
|
|
|
static inline void sort(void *base, size_t num, size_t size,
|
|
|
|
int (*cmp_func)(const void *, const void *),
|
|
|
|
void (*swap_func)(void *, void *, int size))
|
|
|
|
{
|
|
|
|
return qsort(base, num, size, cmp_func);
|
|
|
|
}
|
2017-01-08 12:13:18 +03:00
|
|
|
|
|
|
|
#endif
|