![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
linux 高级编程
LinuxWorking
热爱嵌入式linux研究。
展开
-
Linux __setup宏解析
__setup这条宏在Linux Kernel中使用最多的地方就是定义处理Kernel的启动参数的函数及数据结构,宏定义如下:#define __setup(str, fn) \__setup_param(str, fn, fn, 0)#define __setup_param(str, unique_id, fn, early) \static char __setup_str_原创 2017-11-08 22:22:06 · 615 阅读 · 0 评论 -
linux系统函数container_of浅析
Container_of是linux内核中常用到的一个宏macro,他的主要功能是根据包含在某个结构体中变量的指针来获取该结构体本身的指针,通俗讲就是根据结构体中成员变量中某个成员的首地址来获取该结构体的首地址/***container_of - cast a member of a structure out to thecontaining structure*@ptr: the原创 2017-11-09 16:22:19 · 377 阅读 · 0 评论