list_entry()等价于container_of()
2016-11-02 10:03
513 查看
list_entry() 宏在 linux/list.h 中的定义如下:
/** * 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 list_entry(ptr, type, member) \ container_of(ptr, type, member)可见 list_entry() 宏就是 container_of() 宏的一个别名。
相关文章推荐
- 我也来说说container_of(或者list_entry)
- 关于container_of和list_for_each_entry 及其相关函数的分析
- Linux中的list_entry和container_of
- 内核常见函数之list_for_each_entry/container_of
- #define list_entry(ptr, type, member) \ container_of(ptr, type, member)
- list_for_each_entry/list_entry/container_of
- linux内核之container_of()详解(即:list_entry()的详解)
- Linux内核中list_head、list_for_each、list_entry、container_of之间的关系
- list_entry , container_of
- container_of和list_for_each_entry 及其相关函数的分析
- 关于container_of和list_for_each_entry 及其相关函数的分析
- 关于container_of和list_for_each_entry 及其相关函数的分析
- 关于container_of和list_for_each_entry 及其相关函数的分析
- 关于container_of和list_for_each_entry 及其相关函数的分析
- container_of()和内核链表中的list_entry()
- 关于container_of和list_for_each_entry 及其相关函数的分析
- List of .NET Dependency Injection Containers (IOC)
- Linux内核实现List二个关键的宏offsetof 和 container_of
- get the entry of the circle list;
- hlist_head和list_head区别以及container_of机制 - [linux内核]