VLC  4.0.0-dev
Functions | Variables
sort.c File Reference
Include dependency graph for sort.c:

Functions

static int compar_wrapper (const void *a, const void *b)
 
void vlc_qsort (void *base, size_t nmemb, size_t size, int(*compar)(const void *, const void *, void *), void *arg)
 Sort an array with reentrancy, following the upcoming POSIX prototype. More...
 

Variables

struct {
   int(*   compar )(const void *, const void
      *, void *)
 
   void *   arg
 
state
 

Function Documentation

◆ compar_wrapper()

static int compar_wrapper ( const void *  a,
const void *  b 
)
static

References state.

◆ vlc_qsort()

void vlc_qsort ( void *  base,
size_t  nmemb,
size_t  size,
int(*)(const void *, const void *, void *)  compar,
void *  arg 
)

Sort an array with reentrancy, following the upcoming POSIX prototype.

cf. POSIX qsort_r

Referenced by vlc_loaddir(), and vlc_playlist_Sort().

Variable Documentation

◆ arg

void* arg

◆ compar

int(* compar) (const void *, const void *, void *)

Referenced by vlc_loaddir(), vlc_qsort(), and vlc_scandir().

◆ state

thread_local { ... } state