4 void list_init(struct list *list)
6 list->head.next = &list->head;
7 list->head.prev = &list->head;
10 void list_insert_before(struct list_item *next, struct list_item *new)
13 new->prev = next->prev;
14 next->prev->next = new;
18 void list_insert_after(struct list_item *prev, struct list_item *new)
20 new->next = prev->next;
22 prev->next->prev = new;
26 void list_remove(struct list_item *item)
28 item->next->prev = item->prev;
29 item->prev->next = item->next;