最終更新:2014-04-17 (木) 18:00:11 (3655d)
container_of
Top / container_of
cast a member of a structure out to the containing structure
#define container_of(ptr, type, member) ({ \ const typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );})