摘要: 转自http://hi.baidu.com/mynana/blog/item/1da1ba99239ceb006f068c48.htmllist_entry宏是用来根据list_head指针查找链表所嵌入的结构体的地址,具体实现是依赖宏container_of:#define list_entry(ptr, type, member) container_of(ptr, type, member)container_of的定义如下: 1 /** 2 * container_of - cast a member of a structure out to the containing stru. 阅读全文
posted @ 2011-09-18 17:46 Leon&CC 阅读(2666) 评论(0) 推荐(0) 编辑