Lines Matching refs:list
60 struct pt_section_list *list; in pt_mk_section_list() local
63 list = malloc(sizeof(*list)); in pt_mk_section_list()
64 if (!list) in pt_mk_section_list()
67 memset(list, 0, sizeof(*list)); in pt_mk_section_list()
73 pt_msec_init(&list->section, section, asid, vaddr, offset, size); in pt_mk_section_list()
74 list->isid = isid; in pt_mk_section_list()
76 return list; in pt_mk_section_list()
79 free(list); in pt_mk_section_list()
83 static void pt_section_list_free(struct pt_section_list *list) in pt_section_list_free() argument
85 if (!list) in pt_section_list_free()
88 pt_section_put(list->section.section); in pt_section_list_free()
89 pt_msec_fini(&list->section); in pt_section_list_free()
90 free(list); in pt_section_list_free()
93 static void pt_section_list_free_tail(struct pt_section_list *list) in pt_section_list_free_tail() argument
95 while (list) { in pt_section_list_free_tail()
98 trash = list; in pt_section_list_free_tail()
99 list = list->next; in pt_section_list_free_tail()
154 struct pt_section_list **list, *next, *removed, *new; in pt_image_add() local
173 list = &(image->sections); in pt_image_add()
174 while (*list) { in pt_image_add()
181 current = *list; in pt_image_add()
190 list = &((*list)->next); in pt_image_add()
198 list = &((*list)->next); in pt_image_add()
210 *list = current->next; in pt_image_add()
250 for (; *list; list = &((*list)->next)) in pt_image_add()
253 *list = removed; in pt_image_add()
259 *list = next; in pt_image_add()
266 struct pt_section_list **list; in pt_image_remove() local
271 for (list = &image->sections; *list; list = &((*list)->next)) { in pt_image_remove()
279 trash = *list; in pt_image_remove()
293 *list = trash->next; in pt_image_remove()
338 struct pt_section_list *list; in pt_image_copy() local
353 for (list = src->sections; list; list = list->next) { in pt_image_copy()
356 errcode = pt_image_add(image, list->section.section, in pt_image_copy()
357 &list->section.asid, in pt_image_copy()
358 list->section.vaddr, in pt_image_copy()
359 list->isid); in pt_image_copy()
370 struct pt_section_list **list; in pt_image_remove_by_filename() local
382 for (list = &image->sections; *list;) { in pt_image_remove_by_filename()
389 trash = *list; in pt_image_remove_by_filename()
398 list = &trash->next; in pt_image_remove_by_filename()
406 *list = trash->next; in pt_image_remove_by_filename()
411 list = &trash->next; in pt_image_remove_by_filename()
420 struct pt_section_list **list; in pt_image_remove_by_asid() local
432 for (list = &image->sections; *list;) { in pt_image_remove_by_asid()
437 trash = *list; in pt_image_remove_by_asid()
446 list = &trash->next; in pt_image_remove_by_asid()
450 *list = trash->next; in pt_image_remove_by_asid()
533 struct pt_section_list **start, **list; in pt_image_fetch_section() local
539 for (list = start; *list;) { in pt_image_fetch_section()
544 elem = *list; in pt_image_fetch_section()
552 list = &elem->next; in pt_image_fetch_section()
557 if (list != start) { in pt_image_fetch_section()
558 *list = elem->next; in pt_image_fetch_section()