17 #ifndef included_slist_h 18 #define included_slist_h 66 return elt->
n.
nexts[level];
73 u32 old_level0_value[2];
75 if (level < 2 && (elt->
n.
next0[0] == 0 || elt->
n.
next0[0] & 1))
79 elt->
n.
next0[0] = (index << 1) | 1;
88 old_level0_value[0] = (elt->
n.
next0[0] == (
u32) ~ 0) ?
90 old_level0_value[1] = elt->
n.
next0[1];
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
Fixed length block allocator.
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
word() clib_slist_key_compare_function_t(void *key, u32 elt_pool_index)
clib_slist_search_result_t clib_slist_del(clib_slist_t *sp, void *key)
void clib_slist_add(clib_slist_t *sp, void *key, u32 user_pool_index)
clib_slist_key_compare_function_t * compare
clib_slist_search_result_t
format_function_t format_slist
static u32 clib_slist_get_next_at_level(clib_slist_elt_t *elt, int level)
union clib_slist_elt_t::@727 n
u32 clib_slist_search(clib_slist_t *sp, void *key, u32 *ncompares)
format_function_t * format_user_element
static void clib_slist_set_next_at_level(clib_slist_elt_t *elt, u32 index, int level)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
clib_error_t * clib_slist_init(clib_slist_t *sp, f64 branching_factor, clib_slist_key_compare_function_t compare, format_function_t format_user_element)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".