Lines Matching refs:list

147 #define	LIST_OBJ_TO_EL(list, obj)	\
148 ((void *)((char *)(obj) + (list)->offset))
4234 * Object list maintennance routines
4237 raid_list_create(raid_list_t *list, size_t offset)
4239 list->head = NULL;
4240 list->tail = NULL;
4241 list->offset = offset;
4245 raid_list_head(raid_list_t *list)
4247 return (list->head);
4251 raid_list_next(raid_list_t *list, void *obj)
4253 raid_list_el_t *el = LIST_OBJ_TO_EL(list, obj);
4259 raid_list_insert_tail(raid_list_t *list, void *obj)
4261 raid_list_el_t *el = LIST_OBJ_TO_EL(list, obj), *el1;
4263 el->prev = list->tail;
4264 list->tail = obj;
4268 if (list->head == NULL)
4269 list->head = obj;
4272 el1 = LIST_OBJ_TO_EL(list, el->prev);
4278 raid_list_remove(raid_list_t *list, void *obj)
4280 raid_list_el_t *el = LIST_OBJ_TO_EL(list, obj), *el1;
4282 if (list->head == obj)
4283 list->head = el->next;
4285 if (list->tail == obj)
4286 list->tail = el->prev;
4289 el1 = LIST_OBJ_TO_EL(list, el->next);
4294 el1 = LIST_OBJ_TO_EL(list, el->prev);
4302 raid_list_remove_head(raid_list_t *list)
4304 void *obj = list->head;
4307 raid_list_remove(list, obj);
4313 raid_list_find(raid_list_t *list, raid_obj_id_t obj_id)
4317 for (obj = raid_list_head(list); obj != NULL;
4318 obj = raid_list_next(list, obj))
4369 raid_list_t *list;
4371 list = OBJ_TAB_SLOT(tab, id);
4373 if (raid_list_find(list, id) != NULL)
4376 raid_list_insert_tail(list, obj);
4384 raid_list_t *list;
4387 list = OBJ_TAB_SLOT(tab, id);
4389 if ((obj = raid_list_find(list, id)) != NULL)
4390 raid_list_remove(list, obj);
4398 raid_list_t *list;
4401 list = OBJ_TAB_SLOT(tab, id);
4402 obj = raid_list_find(list, id);
4408 raid_list_destroy(raid_list_t *list)
4410 list->head = NULL;
4411 list->tail = NULL;
4412 list->offset = 0;