17 #ifndef included_dlist_h 18 #define included_dlist_h 57 new->next =
new->prev = head_index;
61 old_last_index = head->
prev;
64 new->next = old_last->
next;
65 new->prev = old_last_index;
66 old_last->
next = new_index;
67 head->
prev = new_index;
85 new->next =
new->prev = head_index;
89 old_first_index = head->
next;
92 new->next = old_first_index;
93 new->prev = old_first->
prev;
94 old_first->
prev = new_index;
95 head->
next = new_index;
124 if (head->
next == ~0 || (head->
next == head_index))
140 if (head->
prev == ~0)
static void clib_dlist_init(dlist_elt_t *pool, u32 index)
static u32 clib_dlist_remove_tail(dlist_elt_t *pool, u32 head_index)
Fixed length block allocator.
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
static void clib_dlist_addtail(dlist_elt_t *pool, u32 head_index, u32 new_index)
static void clib_dlist_addhead(dlist_elt_t *pool, u32 head_index, u32 new_index)
static void clib_dlist_remove(dlist_elt_t *pool, u32 index)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".
static u32 clib_dlist_remove_head(dlist_elt_t *pool, u32 head_index)