Sorting/PointerBased/Linux-2.6.11-rc5-lib-qsort.c File Reference

#include "report.h"
#include <linux/types.h>
#include <linux/kernel.h>

Classes

struct  stack_node

Defines

#define min(x, y)   (x) < (y) ? (x):(y)
#define SWAP(p, a, b)
#define MAX_THRESH   4
#define CHAR_BIT   8
#define STACK_SIZE   (CHAR_BIT * sizeof(size_t))
#define PUSH(low, high)   ((void) ((top->lo = (low)), (top->hi = (high)), ++top))
#define POP(low, high)   ((void) (--top, (low = top->lo), (high = top->hi)))
#define STACK_NOT_EMPTY   (stack < top)

Functions

void sortPointers (void **pbase, size_t total_elems, int(*cmp)(const void *, const void *))

Define Documentation

#define CHAR_BIT   8

#define MAX_THRESH   4

#define min ( x,
 )     (x) < (y) ? (x):(y)

#define POP ( low,
high   )     ((void) (--top, (low = top->lo), (high = top->hi)))

#define PUSH ( low,
high   )     ((void) ((top->lo = (low)), (top->hi = (high)), ++top))

#define STACK_NOT_EMPTY   (stack < top)

#define STACK_SIZE   (CHAR_BIT * sizeof(size_t))

#define SWAP ( p,
a,
b   ) 

Value:

do { \
 void *tmp = p[a];\
 p[a] = p[b]; \
 p[b] = tmp; \
} while (0)


Function Documentation

void sortPointers ( void **  pbase,
size_t  total_elems,
int(*)(const void *, const void *)  cmp 
)

Algorithm Development Kit 1.0