The FreeRADIUS server $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Loading...
Searching...
No Matches
Macros | 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)
 

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[])
 
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.

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 50 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 84 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 121 of file ring_buffer_test.c.

+ Here is the call graph for this function:

◆ usage()

static NEVER_RETURNS void usage ( void  )
static

Definition at line 111 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.