Go to the source code of this file.
|
#define | clib_fifo_len(v) vec_len(v) |
|
#define | clib_fifo_end(v) vec_end(v) |
|
#define | clib_fifo_resize(f, n_elts) f = _clib_fifo_resize ((f), (n_elts), sizeof ((f)[0])) |
|
#define | clib_fifo_validate(f, n_elts) f = _clib_fifo_validate ((f), (n_elts), sizeof (f[0])) |
|
#define | clib_fifo_advance_tail(f, n_elts) |
|
#define | clib_fifo_add1(f, e) |
|
#define | clib_fifo_add2(f, p) |
|
#define | clib_fifo_add(f, e, n) |
|
#define | clib_fifo_sub1(f, e) |
|
#define | clib_fifo_sub2(f, p) |
|
#define | clib_fifo_head(v) ((v) + clib_fifo_head_index (v)) |
|
#define | clib_fifo_tail(v) ((v) + clib_fifo_tail_index (v)) |
|
#define | clib_fifo_free(f) vec_free_h((f),sizeof(clib_fifo_header_t)) |
|
#define | clib_fifo_elt_at_index(v, i) ((v) + clib_fifo_elt_index (v, (i))) |
|
#define | clib_fifo_foreach(v, f, body) |
|
#define clib_fifo_add |
( |
|
f, |
|
|
|
e, |
|
|
|
n |
|
) |
| |
Value: \
_n0 = (n); \
(f) = _clib_fifo_advance_tail ((f), _n0, sizeof ((f)[0]), &_i); \
_n1 = _i + _n0 - _l; \
_n1 = _n1 < 0 ? 0 : _n1; \
clib_memcpy ((f) + 0, (e) + _n0, _n1 *
sizeof ((f)[0])); \
} while (0)
#define clib_memcpy(a, b, c)
Definition at line 208 of file fifo.h.
#define clib_fifo_add1 |
( |
|
f, |
|
|
|
e |
|
) |
| |
Value: (f) = _clib_fifo_advance_tail ((f), 1, sizeof ((f)[0]), &_i); \
(f)[_i] = (e); \
} while (0)
Definition at line 192 of file fifo.h.
#define clib_fifo_add2 |
( |
|
f, |
|
|
|
p |
|
) |
| |
Value: (f) = _clib_fifo_advance_tail ((f), 1, sizeof ((f)[0]), &_i); \
(p) = (f) + _i; \
} while (0)
Definition at line 200 of file fifo.h.
#define clib_fifo_advance_tail |
( |
|
f, |
|
|
|
n_elts |
|
) |
| |
Value: (f) = _clib_fifo_advance_tail ((f), (n_elts), sizeof ((f)[0]), &_i); \
(f) + _i; \
})
Definition at line 161 of file fifo.h.
#define clib_fifo_foreach |
( |
|
v, |
|
|
|
f, |
|
|
|
body |
|
) |
| |
Value: \
while (_n > 0) \
{ \
do { body; } while (0); \
_n--; \
_i++; \
_i = _i >= _l ? 0 : _i; \
} \
} while (0)
static uword clib_fifo_elts(void *v)
static uword clib_fifo_head_index(void *v)
Definition at line 279 of file fifo.h.
#define clib_fifo_resize |
( |
|
f, |
|
|
|
n_elts |
|
) |
| f = _clib_fifo_resize ((f), (n_elts), sizeof ((f)[0])) |
#define clib_fifo_sub1 |
( |
|
f, |
|
|
|
e |
|
) |
| |
Value: (e) = (f)[_i]; \
} while (0)
static uword clib_fifo_elts(void *v)
static uword clib_fifo_advance_head(void *v, uword n_elts)
Definition at line 224 of file fifo.h.
#define clib_fifo_sub2 |
( |
|
f, |
|
|
|
p |
|
) |
| |
Value: (p) = (f) + _i; \
} while (0)
static uword clib_fifo_elts(void *v)
static uword clib_fifo_advance_head(void *v, uword n_elts)
Definition at line 232 of file fifo.h.
#define clib_fifo_validate |
( |
|
f, |
|
|
|
n_elts |
|
) |
| f = _clib_fifo_validate ((f), (n_elts), sizeof (f[0])) |
static uword clib_fifo_advance_head |
( |
void * |
v, |
|
|
uword |
n_elts |
|
) |
| |
|
inlinestatic |
static uword clib_fifo_elt_index |
( |
void * |
v, |
|
|
uword |
i |
|
) |
| |
|
inlinestatic |
static uword clib_fifo_elts |
( |
void * |
v | ) |
|
|
inlinestatic |
static uword clib_fifo_free_elts |
( |
void * |
v | ) |
|
|
inlinestatic |
static uword clib_fifo_head_index |
( |
void * |
v | ) |
|
|
inlinestatic |
static void clib_fifo_reset |
( |
void * |
v | ) |
|
|
inlinestatic |
static uword clib_fifo_tail_index |
( |
void * |
v | ) |
|
|
inlinestatic |