list.h
/* O(n):apply list_remove until destroy all elems.
   we assume all the deletion must succeed as long as an elem was given :p */
apply list_remove until destroy all elems.
we assume all the deletion must succeed as long as an elem was given :p
apply list_remove until destroy all elems . we assume all the deletion must succeed as long as an elem was given : p
static inline void list_destroy(struct list_head_t *head)
{
    while (list_remove(head, head->list))
        ;
}
static inline void list_destroy ( struct list_head_t * head ) { while ( list_remove ( head , head -> list ) ) ; }
O(n):apply list_remove until destroy all elems.
O ( n ) : apply list_remove until destroy all elems .