摘要: 当我们在链表添加/修改多个节点后,我们最终是要通过查找链表中的某一个节点并对其数据进行操作,我们将逐一分析kernel/include/linux/list.h中关于链表遍历的接口。1,list_entry用于获取struct list_head结构体指针所在结构体变量的首地址。@ptr:指向我们要求首地址的结构体内的struct list_head成员变量,ptr的类型也为struct list_head。@type:要求首地址的结构体类型,即struct list_head变量所在的结构体的类型。@member:要求首地址结构体类型内struct list_head变量的变量名。/** . 阅读全文
posted @ 2014-03-11 15:08 Watson 阅读(24268) 评论(0) 推荐(0) 编辑