阅读背景:

为什么在指针算术之前有一个转换为(char *)? (container_of()内部)

来源:互联网 

The macro is defined by

宏由定义

#define container_of(ptr, type, member) ({                      \
        const typeof( ((type *)0)->member ) *__mptr = (ptr);    \
        (type *)( (char *)__mptr - offsetof(type,member) );})
#define contai



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: