linux-链表及相关链表操作
1.链表结构体
struct list_head{
struct list_head *next;
stuct list_head *prev;
}
2.list_entry找到链表所对应结构体指针
#define container_of(ptr, type, member)\
container_of(ptr, type, member)
3.链表初始化
INIT_LIST_HEAD()
#define LIST_HEAD_INIT(name) { &(name), &(na
原创
2020-07-12 01:00:14 ·
106 阅读 ·
0 评论