dl_list: Add DEFINE_DL_LIST
This allows statically defining an empty initialised list.
This commit is contained in:
parent
b49d6ccb74
commit
6604da3cf0
1 changed files with 3 additions and 0 deletions
|
@ -95,4 +95,7 @@ static inline unsigned int dl_list_len(struct dl_list *list)
|
||||||
&item->member != (list); \
|
&item->member != (list); \
|
||||||
item = dl_list_entry(item->member.prev, type, member))
|
item = dl_list_entry(item->member.prev, type, member))
|
||||||
|
|
||||||
|
#define DEFINE_DL_LIST(name) \
|
||||||
|
struct dl_list name = { &(name), &(name) }
|
||||||
|
|
||||||
#endif /* LIST_H */
|
#endif /* LIST_H */
|
||||||
|
|
Loading…
Reference in a new issue