AquilaOS documentation
How it works, and its code
Loading...
Searching...
No Matches
qsort.h File Reference
#include <core/system.h>
#include <core/string.h>

Go to the source code of this file.

Functions

static void __qsort_swap (char *a, char *b, size_t size)
 Swaps two elements of size bytes.
static void qsort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *))
 Sorts an array of nmemb elements of size bytes, in the order compar says, with quicksort (the last element as the pivot).

Function Documentation

◆ __qsort_swap()

void __qsort_swap ( char * a,
char * b,
size_t size )
inlinestatic

Swaps two elements of size bytes.

Definition at line 10 of file qsort.h.

References __qsort_swap().

Referenced by __qsort_swap(), and qsort().

◆ qsort()

void qsort ( void * base,
size_t nmemb,
size_t size,
int(* compar )(const void *, const void *) )
inlinestatic

Sorts an array of nmemb elements of size bytes, in the order compar says, with quicksort (the last element as the pivot).

Definition at line 23 of file qsort.h.

References __qsort_swap(), and qsort().

Referenced by qsort().