14#ifndef LIBELUTILS_ELUTILS_PSL_NDX_H_
15#define LIBELUTILS_ELUTILS_PSL_NDX_H_
29#define PSL_NDX_ELEM_NEXT(ARR_BASE, LINK_FIELD_NAME, NDX) (ARR_BASE[NDX].LINK_FIELD_NAME.next)
30#define PSL_NDX_ELEM_PREV(ARR_BASE, LINK_FIELD_NAME, NDX) (ARR_BASE[NDX].LINK_FIELD_NAME.prev)
32#define PSL_NDX_ELEM_PREV_PTR(ARR_BASE, LINK_FIELD_NAME, NDX) (ARR_BASE[NDX].LINK_FIELD_NAME.prev != -1? &(ARR_BASE[ARR_BASE[NDX].LINK_FIELD_NAME.prev]) : NULL)
33#define PSL_NDX_ELEM_NEXT_PTR(ARR_BASE, LINK_FIELD_NAME, NDX) (ARR_BASE[NDX].LINK_FIELD_NAME.prev != -1? &(ARR_BASE[ARR_BASE[NDX].LINK_FIELD_NAME.next]) : NULL)
38 new_node->next = base->next;
39 new_node->prev = next_node->prev;
40 next_node->prev = new_ndx;
46 new_node->prev = base->prev;
47 new_node->next = prev_node->next;
48 prev_node->next = new_ndx;
#define __END_DECLS
Definition: c_decls.h:10
#define __BEGIN_DECLS
Definition: c_decls.h:9
static void psl_ndx_init(psl_ndx_t *ndx)
Definition: psl_ndx.h:24
static void psl_ndx_add_head(psl_ndx_t *base, psl_ndx_t *new_node, psl_ndx_t *next_node, int new_ndx)
Definition: psl_ndx.h:36
__BEGIN_DECLS struct _psl_ndx_t psl_ndx_t
static void psl_ndx_add_tail(psl_ndx_t *base, psl_ndx_t *new_node, psl_ndx_t *prev_node, int new_ndx)
Definition: psl_ndx.h:44
int prev
Definition: psl_ndx.h:21
int next
Definition: psl_ndx.h:22