October 2017
Intermediate to advanced
586 pages
14h 8m
English
The dynamic method consists of a struct list_head and initializes it with the INIT_LIST_HEAD macro:
struct list_head mylist; INIT_LIST_HEAD(&mylist);
The following is the expansion of INIT_LIST_HEAD:
static inline void INIT_LIST_HEAD(struct list_head *list)
{
list->next = list;
list->prev = list;
}
Read now
Unlock full access