Lines Matching refs:list
64 struct pt_section_list *list; in pt_mk_section_list() local
67 list = malloc(sizeof(*list)); in pt_mk_section_list()
68 if (!list) in pt_mk_section_list()
71 memset(list, 0, sizeof(*list)); in pt_mk_section_list()
77 pt_msec_init(&list->section, section, asid, vaddr, offset, size); in pt_mk_section_list()
78 list->isid = isid; in pt_mk_section_list()
80 return list; in pt_mk_section_list()
83 free(list); in pt_mk_section_list()
87 static void pt_section_list_free(struct pt_section_list *list) in pt_section_list_free() argument
89 if (!list) in pt_section_list_free()
92 pt_section_put(list->section.section); in pt_section_list_free()
93 pt_msec_fini(&list->section); in pt_section_list_free()
94 free(list); in pt_section_list_free()
97 static void pt_section_list_free_tail(struct pt_section_list *list) in pt_section_list_free_tail() argument
99 while (list) { in pt_section_list_free_tail()
102 trash = list; in pt_section_list_free_tail()
103 list = list->next; in pt_section_list_free_tail()
158 struct pt_section_list **list, *next, *removed, *new; in pt_image_add() local
177 list = &(image->sections); in pt_image_add()
178 while (*list) { in pt_image_add()
185 current = *list; in pt_image_add()
194 list = &((*list)->next); in pt_image_add()
202 list = &((*list)->next); in pt_image_add()
214 *list = current->next; in pt_image_add()
254 for (; *list; list = &((*list)->next)) in pt_image_add()
257 *list = removed; in pt_image_add()
263 *list = next; in pt_image_add()
270 struct pt_section_list **list; in pt_image_remove() local
275 for (list = &image->sections; *list; list = &((*list)->next)) { in pt_image_remove()
283 trash = *list; in pt_image_remove()
297 *list = trash->next; in pt_image_remove()
343 struct pt_section_list *list; in pt_image_copy() local
358 for (list = src->sections; list; list = list->next) { in pt_image_copy()
361 errcode = pt_image_add(image, list->section.section, in pt_image_copy()
362 &list->section.asid, in pt_image_copy()
363 list->section.vaddr, in pt_image_copy()
364 list->isid); in pt_image_copy()
375 struct pt_section_list **list; in pt_image_remove_by_filename() local
387 for (list = &image->sections; *list;) { in pt_image_remove_by_filename()
394 trash = *list; in pt_image_remove_by_filename()
403 list = &trash->next; in pt_image_remove_by_filename()
411 *list = trash->next; in pt_image_remove_by_filename()
416 list = &trash->next; in pt_image_remove_by_filename()
425 struct pt_section_list **list; in pt_image_remove_by_asid() local
437 for (list = &image->sections; *list;) { in pt_image_remove_by_asid()
442 trash = *list; in pt_image_remove_by_asid()
451 list = &trash->next; in pt_image_remove_by_asid()
455 *list = trash->next; in pt_image_remove_by_asid()
538 struct pt_section_list **start, **list; in pt_image_fetch_section() local
544 for (list = start; *list;) { in pt_image_fetch_section()
549 elem = *list; in pt_image_fetch_section()
557 list = &elem->next; in pt_image_fetch_section()
562 if (list != start) { in pt_image_fetch_section()
563 *list = elem->next; in pt_image_fetch_section()