2011年11月23日
摘要:
在学习Linux驱动的过程中,遇到一个宏叫做container_of。该宏定义在include/linux/kernel.h中,首先来贴出它的代码:/*** container_of - cast a member of a structure out to the containing structure* @ptr: the pointer to the member.* @type: the type of the container struct this is embedded in.* @member: the name of the member within the struc 阅读全文