4 void list_init(struct list *list)
6 list->head.next = &list->head;
7 list->head.prev = &list->head;
10 void list_add(struct list *list, struct list_item *new)
12 new->next = list->head.next;
13 new->prev = &list->head;
15 list->head.next->prev = new;
16 list->head.next = new;
19 void list_remove(struct list_item *item)
21 item->next->prev = item->prev;
22 item->prev->next = item->next;