4 * linux-like bidirectional lists
10 struct list_head *prev, *next;
13 #define INIT_LIST_HEAD(l) do { (l)->prev = (l)->next = (l); } while (0)
14 #define list_empty(l) ( (l)->next == l )
16 __list_add(struct list_head *o, struct list_head *prev,
17 struct list_head *next)
26 list_add_tail(struct list_head *o, struct list_head *head)
28 __list_add(o, head->prev, head);
31 #define list_first_entry(pL, ty, member) \
32 (ty *)((char *)((pL)->next) - offsetof(ty, member))
35 __list_del(struct list_head *prev, struct list_head *next)
42 list_del(struct list_head *entry)
44 ND("called on %p", entry);
45 __list_del(entry->prev, entry->next);
46 entry->next = entry->prev = NULL;
49 #endif /* _MYLIST_H */