• Home
  • Raw
  • Download

Lines Matching refs:list

43 		struct ptr_list *list = head;  in ptr_list_size()  local
45 nr += list->nr - list->rm; in ptr_list_size()
46 } while ((list = list->next) != head); in ptr_list_size()
57 const struct ptr_list *list = head; in ptr_list_empty() local
63 if (list->nr - list->rm) in ptr_list_empty()
65 } while ((list = list->next) != head); in ptr_list_empty()
76 const struct ptr_list *list = head; in ptr_list_multiple() local
83 nr += list->nr - list->rm; in ptr_list_multiple()
86 } while ((list = list->next) != head); in ptr_list_multiple()
97 struct ptr_list *list = head; in first_ptr_list() local
102 while (list->nr == 0) { in first_ptr_list()
103 list = list->next; in first_ptr_list()
104 if (list == head) in first_ptr_list()
107 return PTR_ENTRY_NOTAG(list, 0); in first_ptr_list()
116 struct ptr_list *list; in last_ptr_list() local
120 list = head->prev; in last_ptr_list()
121 while (list->nr == 0) { in last_ptr_list()
122 if (list == head) in last_ptr_list()
124 list = list->prev; in last_ptr_list()
126 return PTR_ENTRY_NOTAG(list, list->nr-1); in last_ptr_list()
133 void *ptr_list_nth_entry(struct ptr_list *list, unsigned int idx) in ptr_list_nth_entry() argument
135 struct ptr_list *head = list; in ptr_list_nth_entry()
141 unsigned int nr = list->nr; in ptr_list_nth_entry()
144 return list->list[idx]; in ptr_list_nth_entry()
147 } while ((list = list->next) != head); in ptr_list_nth_entry()
169 struct ptr_list *list = head; in linearize_ptr_list() local
172 int i = list->nr; in linearize_ptr_list()
178 memcpy(arr, list->list, i*sizeof(void *)); in linearize_ptr_list()
181 } while ((list = list->next) != head); in linearize_ptr_list()
248 memcpy(newlist->list, head->list + old, nr * sizeof(void *)); in split_ptr_list_head()
249 memset(head->list + old, 0xf0, nr * sizeof(void *)); in split_ptr_list_head()
262 struct ptr_list *list = *listp; in __add_ptr_list() local
267 if (!list || (nr = (last = list->prev)->nr) >= LIST_NODE_NR) { in __add_ptr_list()
269 if (!list) { in __add_ptr_list()
275 newlist->next = list; in __add_ptr_list()
276 list->prev = newlist; in __add_ptr_list()
282 ret = last->list + nr; in __add_ptr_list()
316 const struct ptr_list *list = head; in lookup_ptr_list_entry() local
321 int nr = list->nr; in lookup_ptr_list_entry()
324 if (list->list[i] == entry) in lookup_ptr_list_entry()
326 } while ((list = list->next) != head); in lookup_ptr_list_entry()
335 int delete_ptr_list_entry(struct ptr_list **list, void *entry, int count) in delete_ptr_list_entry() argument
339 FOR_EACH_PTR(*list, ptr) { in delete_ptr_list_entry()
348 pack_ptr_list(list); in delete_ptr_list_entry()
358 int replace_ptr_list_entry(struct ptr_list **list, void *old_ptr, in replace_ptr_list_entry() argument
363 FOR_EACH_PTR(*list, ptr) { in replace_ptr_list_entry()
393 ptr = last->list[nr]; in undo_ptr_list_last()
394 last->list[nr] = (void *)0xf1f1f1f1; in undo_ptr_list_last()
414 ptr = last->list[--last->nr]; in delete_ptr_list_last()
463 void *ptr = cur->list[i++]; in copy_ptr_list()
474 tail->list[idx++] = ptr; in copy_ptr_list()
497 struct ptr_list *tmp, *list = *listp; in __free_ptr_list() local
499 if (!list) in __free_ptr_list()
502 list->prev->next = NULL; in __free_ptr_list()
503 while (list) { in __free_ptr_list()
504 tmp = list; in __free_ptr_list()
505 list = list->next; in __free_ptr_list()