Lines Matching refs:list

22 static inline void dl_list_init(struct dl_list *list)  in dl_list_init()  argument
24 list->next = list; in dl_list_init()
25 list->prev = list; in dl_list_init()
28 static inline void dl_list_add(struct dl_list *list, struct dl_list *item) in dl_list_add() argument
30 item->next = list->next; in dl_list_add()
31 item->prev = list; in dl_list_add()
32 list->next->prev = item; in dl_list_add()
33 list->next = item; in dl_list_add()
36 static inline void dl_list_add_tail(struct dl_list *list, struct dl_list *item) in dl_list_add_tail() argument
38 dl_list_add(list->prev, item); in dl_list_add_tail()
49 static inline int dl_list_empty(const struct dl_list *list) in dl_list_empty() argument
51 return list->next == list; in dl_list_empty()
54 static inline unsigned int dl_list_len(const struct dl_list *list) in dl_list_len() argument
58 for (item = list->next; item != list; item = item->next) in dl_list_len()
70 #define dl_list_first(list, type, member) \ argument
71 (dl_list_empty((list)) ? NULL : \
72 dl_list_entry((list)->next, type, member))
74 #define dl_list_last(list, type, member) \ argument
75 (dl_list_empty((list)) ? NULL : \
76 dl_list_entry((list)->prev, type, member))
78 #define dl_list_for_each(item, list, type, member) \ argument
79 for (item = dl_list_entry((list)->next, type, member); \
80 &item->member != (list); \
83 #define dl_list_for_each_safe(item, n, list, type, member) \ argument
84 for (item = dl_list_entry((list)->next, type, member), \
86 &item->member != (list); \
89 #define dl_list_for_each_reverse(item, list, type, member) \ argument
90 for (item = dl_list_entry((list)->prev, type, member); \
91 &item->member != (list); \