摘要:
include/Linux/stddef.h中macro offsetof define,list:#define offsetof(TYPE,MEMBER) ((size_t) &((TYPE *)0)->MEMBER)offsetof macro对于上述示例的展开剂分析:&((struct example_struct *)0)->list表示当结构example_struct正好在地址0上时其成员list的地址,即成员位移.traverse linked list member element;下面使用list_entry macro遍历链表得到链表指针,再从 阅读全文
posted @ 2014-02-23 21:15
秦瑞It行程实录
阅读(183)
评论(0)
推荐(0)