函数逻辑报告 |
Source Code:kernel\sched\cpufreq_schedutil.c |
Create Date:2022-07-27 10:45:40 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:sugov_init
函数原型:static int sugov_init(struct cpufreq_policy *policy)
返回类型:int
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| struct cpufreq_policy * | policy |
| 741 | ret等于0 |
| 744 | 如果governor_data则返回:负EBUSY |
| 750 | 如果非sg_policy则 |
| 752 | 转到:disable_fast_switch |
| 755 | ret等于sugov_kthread_create(sg_policy) |
| 756 | 如果ret则转到:free_sg_policy |
| 759 | mutex_lock( & global_tunables_lock) |
| 762 | 如果WARN_ON(have_governor_per_policy())则 |
| 764 | 转到:stop_kthread |
| 766 | governor_data等于sg_policy |
| 769 | gov_attr_set_get( & attr_set, & tunables_hook) |
| 770 | 转到:out |
| 774 | 如果非tunables则 |
| 776 | 转到:stop_kthread |
| 781 | governor_data等于sg_policy |
| 790 | out : |
| 791 | mutex_unlock( & global_tunables_lock) |
| 792 | 返回:0 |
| 794 | fail : |
| 795 | 递减引用计数对象 |
| 796 | governor_data = NULL |
| 799 | stop_kthread : |
| 801 | mutex_unlock( & global_tunables_lock) |
| 803 | free_sg_policy : |
| 806 | disable_fast_switch : |
| 810 | 返回:ret |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |