繁荣大神

文章
8
资源
0
加入时间
3年12月3天

linux内核中循环链表说明_list_head, list_for_each, list_entry

1. linux 内核中循环链表内核中的循环链表实现:struct list_head{struct list_head *next, *prev;};平时我们用的循环链表实现:struct list{struct list *next, *prev;int value;};两者区别在于,list_head中只有前指针next和后指针prev; list中还有我们关心的数据value;2. list_for_eachlist_for_each 是针对内核中特有的循环链表设计的一个宏