平台 | 内核版本 | 安卓版本 |
---|---|---|
RK3399 | Linux4.4 | Android7.1 |
一、原理
通过结构体成员变量地址获取结构体首地址,以便访问其他变量使用
/**
* 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 struct.
*
*/
#
- 1
- 2
- 3
- 4
- 5
- 6
- 7

交个朋友:加V领优惠卷
微信名片


评论记录:
回复评论: