container_of()
http://broken.build/2012/11/10/magical-container_of-macro/
代码如下:
#define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
图解: