mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-29 23:53:32 +00:00
a0019cd7d4
Adding support to have priv pointer in swap callback function.
Following the initial change on cmp callback functions [1]
and adding SWAP_WRAPPER macro to identify sort call of sort_r.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Masami Hiramatsu <mhiramat@kernel.org>
Link: https://lore.kernel.org/bpf/20220316122419.933957-2-jolsa@kernel.org
[1] 4333fb96ca
("media: lib/sort.c: implement sort() variant taking context argument")
16 lines
348 B
C
16 lines
348 B
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _LINUX_SORT_H
|
|
#define _LINUX_SORT_H
|
|
|
|
#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);
|
|
|
|
void sort(void *base, size_t num, size_t size,
|
|
cmp_func_t cmp_func,
|
|
swap_func_t swap_func);
|
|
|
|
#endif
|