1*e8ac9067SFrançois Tigeot /*
2*e8ac9067SFrançois Tigeot * Copyright (c) 2017 François Tigeot <ftigeot@wolfpond.org>
3*e8ac9067SFrançois Tigeot * All rights reserved.
4*e8ac9067SFrançois Tigeot *
5*e8ac9067SFrançois Tigeot * Redistribution and use in source and binary forms, with or without
6*e8ac9067SFrançois Tigeot * modification, are permitted provided that the following conditions
7*e8ac9067SFrançois Tigeot * are met:
8*e8ac9067SFrançois Tigeot * 1. Redistributions of source code must retain the above copyright
9*e8ac9067SFrançois Tigeot * notice unmodified, this list of conditions, and the following
10*e8ac9067SFrançois Tigeot * disclaimer.
11*e8ac9067SFrançois Tigeot * 2. Redistributions in binary form must reproduce the above copyright
12*e8ac9067SFrançois Tigeot * notice, this list of conditions and the following disclaimer in the
13*e8ac9067SFrançois Tigeot * documentation and/or other materials provided with the distribution.
14*e8ac9067SFrançois Tigeot *
15*e8ac9067SFrançois Tigeot * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16*e8ac9067SFrançois Tigeot * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17*e8ac9067SFrançois Tigeot * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18*e8ac9067SFrançois Tigeot * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19*e8ac9067SFrançois Tigeot * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20*e8ac9067SFrançois Tigeot * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21*e8ac9067SFrançois Tigeot * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22*e8ac9067SFrançois Tigeot * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23*e8ac9067SFrançois Tigeot * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24*e8ac9067SFrançois Tigeot * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25*e8ac9067SFrançois Tigeot */
26*e8ac9067SFrançois Tigeot
27*e8ac9067SFrançois Tigeot #include <linux/sort.h>
28*e8ac9067SFrançois Tigeot
29*e8ac9067SFrançois Tigeot #include <sys/libkern.h>
30*e8ac9067SFrançois Tigeot
31*e8ac9067SFrançois Tigeot void
sort(void * base,size_t num,size_t size,int (* cmp_func)(const void *,const void *),void (* swap_func)(void *,void *,int))32*e8ac9067SFrançois Tigeot sort(void *base, size_t num, size_t size,
33*e8ac9067SFrançois Tigeot int (*cmp_func)(const void *, const void *),
34*e8ac9067SFrançois Tigeot void (*swap_func)(void *, void *, int))
35*e8ac9067SFrançois Tigeot {
36*e8ac9067SFrançois Tigeot kqsort(base, num, size, cmp_func);
37*e8ac9067SFrançois Tigeot }
38