浩森宇特品牌如何建设一个有效的网站?
摘要:品牌网站建设浩森宇特,一般做网站,如何在手机上制作网站,安卓和网站开发找工作本文部分内容参考Linux Thermal 学习笔记 - 爱码网。特此致谢! 接前一篇文章Linux内核Thermal框架详解四、Th
品牌网站建设浩森宇特,一般做网站,如何在手机上制作网站,安卓和网站开发找工作本文部分内容参考Linux Thermal 学习笔记 - 爱码网。特此致谢#xff01; 接前一篇文章Linux内核Thermal框架详解四、Thermal Core#xff08;3#xff09; 三、相关源码及分析
2. thermal_register_governors
上一回说到这一段代码#xff1a;
for (__governor __gove…本文部分内容参考Linux Thermal 学习笔记 - 爱码网。特此致谢 接前一篇文章Linux内核Thermal框架详解四、Thermal Core3 三、相关源码及分析
2. thermal_register_governors
上一回说到这一段代码
for (__governor __governor_thermal_table; \__governor __governor_thermal_table_end; \__governor) {ret thermal_register_governor(*governor);if (ret) {pr_err(Failed to register governor: %s,(*governor)-name);break;}pr_info(Registered thermal governor %s,(*governor)-name);
}__governor_thermal_table上一回仔细分析了其来龙去脉现在该关注__governor这个变量了。
__governor这个变量在之前代码中出现过如下
struct thermal_governor **governor;
这是一个二重指针即指向指针的指针。在上述代码中它一开始指向了__governor_thermal_table还记得__governor_thermal_table是怎样定义的吗
在drivers/thermal/thermal_core.h中
extern struct thermal_governor *__governor_thermal_table[];
extern struct thermal_governor *__governor_thermal_table_end[];
虽然这里是extern但是这比include/asm-generic/vmlinux.lds.h中真正定义__governor_thermal_table的地方好理解。__governor_thermal_table实际上是一个指针数组。所以使用二重指针governor指向它也就合情合理了。
