hat-util  0.6.16
Utility library
ring.h File Reference
#include <stdint.h>
#include "allocator.h"
Include dependency graph for ring.h:

Go to the source code of this file.

Typedefs

typedef struct hat_ring_t hat_ring_t
 

Functions

hat_ring_that_ring_create (hat_allocator_t *a, size_t size)
 
void hat_ring_destroy (hat_ring_t *r)
 
size_t hat_ring_len (hat_ring_t *r)
 
size_t hat_ring_size (hat_ring_t *r)
 
void hat_ring_move_head (hat_ring_t *r, size_t len)
 
void hat_ring_move_tail (hat_ring_t *r, size_t len)
 
size_t hat_ring_read (hat_ring_t *r, uint8_t *data, size_t data_len)
 
size_t hat_ring_write (hat_ring_t *r, uint8_t *data, size_t data_len)
 
void hat_ring_used (hat_ring_t *r, uint8_t *data[2], size_t data_len[2])
 
void hat_ring_unused (hat_ring_t *r, uint8_t *data[2], size_t data_len[2])
 

Typedef Documentation

◆ hat_ring_t

typedef struct hat_ring_t hat_ring_t

Function Documentation

◆ hat_ring_create()

hat_ring_t* hat_ring_create ( hat_allocator_t a,
size_t  size 
)

◆ hat_ring_destroy()

void hat_ring_destroy ( hat_ring_t r)

◆ hat_ring_len()

size_t hat_ring_len ( hat_ring_t r)

◆ hat_ring_move_head()

void hat_ring_move_head ( hat_ring_t r,
size_t  len 
)

◆ hat_ring_move_tail()

void hat_ring_move_tail ( hat_ring_t r,
size_t  len 
)

◆ hat_ring_read()

size_t hat_ring_read ( hat_ring_t r,
uint8_t *  data,
size_t  data_len 
)

◆ hat_ring_size()

size_t hat_ring_size ( hat_ring_t r)

◆ hat_ring_unused()

void hat_ring_unused ( hat_ring_t r,
uint8_t *  data[2],
size_t  data_len[2] 
)

◆ hat_ring_used()

void hat_ring_used ( hat_ring_t r,
uint8_t *  data[2],
size_t  data_len[2] 
)

◆ hat_ring_write()

size_t hat_ring_write ( hat_ring_t r,
uint8_t *  data,
size_t  data_len 
)