The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Macros | Typedefs | Functions | Variables
ring_buffer_test.c File Reference
#include <freeradius-devel/io/ring_buffer.h>
#include <freeradius-devel/util/debug.h>
#include <freeradius-devel/util/hash.h>
#include <freeradius-devel/util/syserror.h>
#include <freeradius-devel/util/talloc.h>
#include <string.h>
+ Include dependency graph for ring_buffer_test.c:

Go to the source code of this file.

Macros

#define ALLOC_SIZE   (8)
 
#define ARRAY_SIZE   (4 * ALLOC_SIZE)
 

Typedefs

typedef struct request_s request_t
 

Functions

static void alloc_blocks (fr_ring_buffer_t *rb, uint32_t *seed, UNUSED int *start, int *end)
 
static void free_blocks (fr_ring_buffer_t *rb, UNUSED uint32_t *seed, int *start, int *end)
 
int main (int argc, char *argv[])
 
request_trequest_alloc (UNUSED TALLOC_CTX *ctx, UNUSED request_init_args_t const *args)
 
void request_verify (UNUSED char const *file, UNUSED int line, UNUSED request_t *request)
 
static NEVER_RETURNS void usage (void)
 

Variables

static size_t array [ARRAY_SIZE]
 
static uint8_tdata [ARRAY_SIZE]
 
static int debug_lvl = 0
 
static char const * seed_string = "foo"
 
static size_t seed_string_len = 3
 
static size_t used = 0
 

Macro Definition Documentation

◆ ALLOC_SIZE

#define ALLOC_SIZE   (8)

Definition at line 36 of file ring_buffer_test.c.

◆ ARRAY_SIZE

#define ARRAY_SIZE   (4 * ALLOC_SIZE)

Definition at line 37 of file ring_buffer_test.c.

Typedef Documentation

◆ request_t

typedef struct request_s request_t

Definition at line 46 of file ring_buffer_test.c.

Function Documentation

◆ alloc_blocks()

static void alloc_blocks ( fr_ring_buffer_t rb,
uint32_t seed,
UNUSED int *  start,
int *  end 
)
static

Definition at line 64 of file ring_buffer_test.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ free_blocks()

static void free_blocks ( fr_ring_buffer_t rb,
UNUSED uint32_t seed,
int *  start,
int *  end 
)
static

Definition at line 98 of file ring_buffer_test.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 135 of file ring_buffer_test.c.

+ Here is the call graph for this function:

◆ request_alloc()

request_t* request_alloc ( UNUSED TALLOC_CTX *  ctx,
UNUSED request_init_args_t const *  args 
)

Definition at line 53 of file ring_buffer_test.c.

◆ request_verify()

void request_verify ( UNUSED char const *  file,
UNUSED int  line,
UNUSED request_t request 
)

Definition at line 58 of file ring_buffer_test.c.

◆ usage()

static NEVER_RETURNS void usage ( void  )
static

Definition at line 125 of file ring_buffer_test.c.

+ Here is the caller graph for this function:

Variable Documentation

◆ array

size_t array[ARRAY_SIZE]
static

Definition at line 40 of file ring_buffer_test.c.

◆ data

uint8_t* data[ARRAY_SIZE]
static

Definition at line 41 of file ring_buffer_test.c.

◆ debug_lvl

int debug_lvl = 0
static

Definition at line 43 of file ring_buffer_test.c.

◆ seed_string

char const* seed_string = "foo"
static

Definition at line 45 of file ring_buffer_test.c.

◆ seed_string_len

size_t seed_string_len = 3
static

Definition at line 46 of file ring_buffer_test.c.

◆ used

size_t used = 0
static

Definition at line 39 of file ring_buffer_test.c.