• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /barrelfish-2018-10-04/lib/collections/

Lines Matching refs:start

46 static collections_listnode *list_create_node(collections_listnode *start,
55 ((collections_header_data *)(start->data))->size ++;
59 static void list_destroy_node(collections_listnode *start,
64 ((collections_header_data*)start->data)->size--;
75 void collections_list_create(collections_listnode **start,
92 *start = t;
98 void collections_list_release(collections_listnode *start)
101 ((collections_header_data*)start->data)->data_free;
102 collections_listnode *cur = start->next;
108 while (cur != start)
115 list_destroy_node(start, cur);
116 cur = start->next;
122 free(start->data);
123 free(start);
131 int32_t collections_list_insert(collections_listnode *start, void *data)
133 collections_listnode *ret = list_create_node(start, start, data);
144 int32_t collections_list_insert_tail(collections_listnode *start, void *data)
146 collections_listnode *ret = list_create_node(start, start->prev, data);
157 void *collections_list_find_if(collections_listnode *start,
160 collections_listnode *cur = start->next;
161 while (cur != start)
178 void *collections_list_remove_if(collections_listnode *start,
181 collections_listnode *cur = start->next;
182 while (cur != start)
187 list_destroy_node(start, cur);
200 uint32_t collections_list_remove_if_all(collections_listnode *start,
205 collections_listnode *cur = start->next;
206 while (cur != start)
210 list_destroy_node(start, cur);
219 void *collections_list_remove_ith_item(collections_listnode *start,
224 uint32_t n = collections_list_size(start);
229 collections_listnode *cur = start->next;
235 list_destroy_node(start, cur);
239 collections_listnode *cur = start;
245 list_destroy_node(start, cur);
251 void *collections_list_get_ith_item(collections_listnode *start, uint32_t item)
253 uint32_t n = collections_list_size(start);
259 collections_listnode* cur = start->next;
269 collections_listnode *cur = start;
281 uint32_t collections_list_size(collections_listnode *start)
283 return ((collections_header_data *)(start->data))->size;
287 static void* list_front(collections_listnode* start)
289 return (start->next == start) ? NULL : start->next->data;
292 static void* list_back(collections_listnode* start)
294 return (start->prev == start) ? NULL : start->prev->data;
306 int32_t collections_list_traverse_start(collections_listnode *start)
308 collections_header_data* head = (collections_header_data *) start->data;
317 head->cur_item = start;
327 void *collections_list_traverse_next(collections_listnode *start)
329 collections_header_data *head = (collections_header_data *) start->data;
339 if (head->cur_item == start)
352 int32_t collections_list_traverse_end(collections_listnode *start)
354 collections_header_data *head = (collections_header_data *) start->data;
368 int collections_list_visit(collections_listnode *start,
371 collections_listnode *cur = start->next;
372 while (cur != start && func(cur->data, arg))
376 return cur == start;