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 203 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 187 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 195 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 156 of file fifo.h.
#define clib_fifo_end |
( |
|
v | ) |
vec_end(v) |
#define clib_fifo_foreach |
( |
|
v, |
|
|
|
f, |
|
|
|
body |
|
) |
| |
Value: \
while (_n > 0) \
{ \
(v) = (f) + _i; \
do { body; } while (0); \
_n--; \
_i++; \
_i = _i >= _l ? 0 : _i; \
} \
} while (0)
always_inline uword clib_fifo_elts(void *v)
always_inline uword clib_fifo_head_index(void *v)
Definition at line 274 of file fifo.h.
#define clib_fifo_len |
( |
|
v | ) |
vec_len(v) |
#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)
always_inline uword clib_fifo_elts(void *v)
always_inline uword clib_fifo_advance_head(void *v, uword n_elts)
Definition at line 219 of file fifo.h.
#define clib_fifo_sub2 |
( |
|
f, |
|
|
|
p |
|
) |
| |
Value: (p) = (f) + _i; \
} while (0)
always_inline uword clib_fifo_elts(void *v)
always_inline uword clib_fifo_advance_head(void *v, uword n_elts)
Definition at line 227 of file fifo.h.
#define clib_fifo_validate |
( |
|
f, |
|
|
|
n_elts |
|
) |
| f = _clib_fifo_validate ((f), (n_elts), sizeof (f[0])) |