ZEDA
1.6.18
|
ring buffer. More...
#include <zeda/zeda_misc.h>
Go to the source code of this file.
Macros | |
#define | zRingClass(ring_t, cell_t) |
generate ring buffer class. More... | |
#define | zRingSize(y) (y)->size |
#define | zRingBuf(y) ( (y)->buf ) |
#define | zRingElemSize(y) sizeof(*zRingBuf(y)) |
#define | zRingHead(y) ( &zRingBuf(y)[(y)->head] ) |
#define | zRingElem(y, i) ( &zRingBuf(y)[((y)->head+(i)) % (y)->size] ) |
#define | zRingSetElem(a, i, d) memcpy( zRingElem(a,i), (d), zRingElemSize(a) ) |
#define | zRingReset(y) ( (y)->head = 0 ); |
#define | zRingInit(y) |
#define | zRingAlloc(y, type, size) |
allocate an array. More... | |
#define | zRingFree(y) |
#define | zRingIncHead(y) |
#define | zRingDecHead(y) |
ring buffer.