函数逻辑报告 |
Source Code:arch\x86\kernel\apm_32.c |
Create Date:2022-07-27 09:22:45 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:Just start the APM thread. We do NOT want to do APM BIOS* calls from anything but the APM thread, if for no other reason* than the fact that we don't trust the APM BIOS. This way,* most common APM BIOS problems that lead to protection errors
函数原型:static int __init apm_init(void)
返回类型:int
参数:无
2259 | 如果电源管理版本恒等于0或machine_is_olpc()则 |
2260 | printk(formational "apm: BIOS not found.\n") |
2261 | 返回:负ENODEV |
2263 | printk(formational "apm: BIOS version %d.%d Flags 0x%02x (Driver version %s)\n", ((电源管理版本 >> 8) & 0xff), (电源管理版本 & 0xff), 电源管理标志, spaces ) |
2269 | 如果电源管理标志按位与APM_32_BIT_SUPPORT的值恒等于0则 |
2270 | printk(formational "apm: no 32 bit BIOS support\n") |
2271 | 返回:负ENODEV |
2274 | 如果allow_ints则allow_ints等于1 |
2276 | 如果broken_psr则get_power_status_broken等于1 |
2278 | 如果realmode_power_off则realmode_power_off等于1 |
2281 | 如果apm_disabled不等于负1则disabled等于apm_disabled |
2292 | 如果电源管理版本小于0x102则电源管理16位标识长度等于0 |
2295 | 如果debug则 |
2303 | 如果电源管理版本大于0x101则printk(" cseg16 len %x", 电源管理16位标识长度) |
2305 | printk("\n") |
2308 | 如果disabled则 |
2312 | 如果num_online_cpus()大于1且非power_off且非smp则 |
2317 | 如果非acpi_disabled则 |
2340 | gdt等于Provide the original GDT |
2341 | set_desc_base( & gdt[APM_CS >> 3], (unsignedlong)__va((unsignedlong)电源管理标识 << 4)) |
2343 | set_desc_base( & gdt[APM_CS_16 >> 3], (unsignedlong)__va((unsignedlong)电源管理16位标识 << 4)) |
2345 | set_desc_base( & gdt[APM_DS >> 3], (unsignedlong)__va((unsignedlong)电源管理数据区 << 4)) |
2348 | proc_create_single("apm", 0, NULL, proc_apm_show) |
2351 | 如果是错误则 |
2352 | 打印错误信息("disabled - Unable to start kernel thread\n") |
2354 | kapmd_task = NULL |
2355 | remove_proc_entry("apm", NULL) |
2356 | 返回:err |
2358 | 唤醒中断线程 |
2360 | 如果num_online_cpus()大于1且非smp则 |
2361 | printk(rmal but significant condition "apm: disabled - APM is not SMP safe (power off active).\n") |
2363 | 返回:0 |
2371 | 如果注册一个设备则printk(warning conditions "apm: Could not register misc device.\n") |
2374 | 如果HZ不等于100则idle_period等于idle_period乘HZ除100 |
2376 | 如果idle_threshold小于100则 |
2377 | cpuidle_poll_state_init( & apm_idle_driver) |
2378 | 如果非cpuidle_register_driver( & apm_idle_driver)则如果cpuidle_register_device( & apm_cpuidle_device)则 |
2380 | cpuidle_unregister_driver( & apm_idle_driver) |
2383 | 返回:0 |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |