内核双向链表list.h中的list_entry
来源:互联网 发布:mac如何查看运行程序 编辑:程序博客网 时间:2024/04/29 19:25
内核双向链表list.h中的list_entry定义:
#define list_entry(ptr, type, member) container_of(ptr, type, member)
程序注释为:
/**
* list_entry - get the struct for this entry
* @ptr: the &struct list_head pointer.
* @type: the type of the struct this is embedded in.
* @member: the name of the list_struct within the struct.
*/
刚开始没有理解。
现在明白,注释的意思是从一个实体中得到它的结构体。
#define container_of(ptr, type, member) ({const typeof( ((type *)0)->member ) *__mptr = (ptr); (type *)( (char *)__mptr - offsetof(type,member) );})
- 内核双向链表list.h中的list_entry
- container_of()和内核链表中的list_entry()
- container_of()和内核链表中的list_entry()
- Linux内核List中的list_entry分析
- LIST_ENTRY双向链表的练习
- 详解Linux内核之双向循环链表(2) list_for_each/list_entry/list_for_each_entry
- linux 2.4内核中双向链表的实现/include/linux/list.h
- Linux 内核中双向链表及list.h 文件分析
- 整理一个双向链表list.h
- 双向链表list.h升序排序
- 内核链表list.h
- 深入分析 Linux 内核链表 list_entry...
- 深入分析 Linux 内核链表 list_entry...
- 内核链表list_entry()宏详解
- linux内核中的list_entry宏
- list.h linux内核链表分析
- 内核链表list.h文件剖析
- 浅谈list.h头文件之双向循环链表
- 最简单的TCP网络封包解包(补充)-序列化
- OpenWFE项目分析
- [Cocoa]在工程中添加 Three20 库
- openwfe的下载与配置
- valgrind教程
- 内核双向链表list.h中的list_entry
- VIM 使用【删除换行符 设置tab】
- Oracle SQL性能优化
- Android异步处理一:使用Thread+Handler实现非UI线程更新UI界面
- 赫夫曼编码
- linq to sql group by 使用
- 去除UILabel的背景色
- Android开发常见错误,经常会碰到
- 使用HP Service Test测试Web Services