Lines Matching refs:list

58         OSSL_LIST_DBG(struct ossl_list_st_ ## name *list)                   \
70 ossl_list_##name##_init(OSSL_LIST(name) *list) \
72 memset(list, 0, sizeof(*list)); \
81 ossl_list_##name##_is_empty(const OSSL_LIST(name) *list) \
83 return list->num_elems == 0; \
86 ossl_list_##name##_num(const OSSL_LIST(name) *list) \
88 return list->num_elems; \
91 ossl_list_##name##_head(const OSSL_LIST(name) *list) \
93 assert(list->alpha == NULL \
94 || list->alpha->ossl_list_ ## name.list == list); \
95 return list->alpha; \
98 ossl_list_##name##_tail(const OSSL_LIST(name) *list) \
100 assert(list->omega == NULL \
101 || list->omega->ossl_list_ ## name.list == list); \
102 return list->omega; \
121 ossl_list_##name##_remove(OSSL_LIST(name) *list, type *elem) \
123 assert(elem->ossl_list_ ## name.list == list); \
124 OSSL_LIST_DBG(elem->ossl_list_ ## name.list = NULL) \
125 if (list->alpha == elem) \
126 list->alpha = elem->ossl_list_ ## name.next; \
127 if (list->omega == elem) \
128 list->omega = elem->ossl_list_ ## name.prev; \
135 list->num_elems--; \
140 ossl_list_##name##_insert_head(OSSL_LIST(name) *list, type *elem) \
142 assert(elem->ossl_list_ ## name.list == NULL); \
143 OSSL_LIST_DBG(elem->ossl_list_ ## name.list = list) \
144 if (list->alpha != NULL) \
145 list->alpha->ossl_list_ ## name.prev = elem; \
146 elem->ossl_list_ ## name.next = list->alpha; \
148 list->alpha = elem; \
149 if (list->omega == NULL) \
150 list->omega = elem; \
151 list->num_elems++; \
154 ossl_list_##name##_insert_tail(OSSL_LIST(name) *list, type *elem) \
156 assert(elem->ossl_list_ ## name.list == NULL); \
157 OSSL_LIST_DBG(elem->ossl_list_ ## name.list = list) \
158 if (list->omega != NULL) \
159 list->omega->ossl_list_ ## name.next = elem; \
160 elem->ossl_list_ ## name.prev = list->omega; \
162 list->omega = elem; \
163 if (list->alpha == NULL) \
164 list->alpha = elem; \
165 list->num_elems++; \
168 ossl_list_##name##_insert_before(OSSL_LIST(name) *list, type *e, \
171 assert(elem->ossl_list_ ## name.list == NULL); \
172 OSSL_LIST_DBG(elem->ossl_list_ ## name.list = list) \
178 if (list->alpha == e) \
179 list->alpha = elem; \
180 list->num_elems++; \
183 ossl_list_##name##_insert_after(OSSL_LIST(name) *list, type *e, \
186 assert(elem->ossl_list_ ## name.list == NULL); \
187 OSSL_LIST_DBG(elem->ossl_list_ ## name.list = list) \
193 if (list->omega == e) \
194 list->omega = elem; \
195 list->num_elems++; \