TRAP ring buffer data structure.
More...
#include "trap_buffer.h"
#include <stdint.h>
#include <inttypes.h>
Go to the source code of this file.
|
static void | _tb_block_clear (tb_block_t *bl) |
|
static int | _tb_block_init (tb_block_t *b) |
|
static int | _tb_block_destroy (tb_block_t *b) |
|
static tb_block_t * | tb_computenext_blockp (trap_buffer_t *tb, uint16_t curidx) |
|
void | tb_next_wr_block (trap_buffer_t *tb) |
|
void | tb_next_rd_block (trap_buffer_t *tb) |
|
void | tb_first_rd_block (trap_buffer_t *b) |
|
void | tb_first_wr_block (trap_buffer_t *b) |
|
int | tb_isblockfree (tb_block_t *b) |
|
trap_buffer_t * | tb_init (uint16_t nblocks, uint32_t blocksize) |
|
void | tb_destroy (trap_buffer_t **b) |
|
int | tb_lock (trap_buffer_t *b) |
|
int | tb_unlock (trap_buffer_t *b) |
|
int | tb_block_lock (tb_block_t *bl) |
|
int | tb_block_unlock (tb_block_t *bl) |
|
static int | _tb_pushmess_checksize (trap_buffer_t *b, tb_block_t **bl, uint32_t ts) |
|
int | tb_pushmess (trap_buffer_t *b, const void *data, uint16_t size) |
|
int | tb_pushmess2 (trap_buffer_t *b, const void *d1, uint16_t s1, const void *d2, uint16_t s2) |
|
int | tb_getmess (trap_buffer_t *b, const void **data, uint16_t *size) |
|
void | tb_clear_unused (trap_buffer_t *tb) |
|
TRAP ring buffer data structure.
- Author
- Tomas Cejka cejka.nosp@m.t@ce.nosp@m.snet..nosp@m.cz
- Date
- 2016
Definition in file trap_buffer.c.
◆ BLOCKSIZE_TOTAL
#define BLOCKSIZE_TOTAL |
( |
|
tb | ) |
(tb->blocksize + sizeof(tb_block_t)) |
◆ DBG_PRINT
◆ DEBUG_PRINTS
Change to 1 to enable debug printing.
Definition at line 58 of file trap_buffer.c.
◆ _tb_block_clear()
◆ _tb_block_destroy()
◆ _tb_block_init()
◆ _tb_pushmess_checksize()
◆ tb_computenext_blockp()