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