函数逻辑报告 |
Source Code:kernel\power\hibernate.c |
Create Date:2022-07-27 10:59:32 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:hibernate - Carry out system hibernation, including saving the image.
函数原型:int hibernate(void)
返回类型:int
参数:无
| 697 | nr_calls等于0 |
| 698 | bool snapshot_test = false |
| 700 | 如果非hibernation_available()则 |
| 705 | lock_system_sleep() |
| 712 | 打印信息("hibernation entry\n") |
| 713 | pm_prepare_console() |
| 714 | error等于__pm_notifier_call_chain(Going to hibernate , - 1, & nr_calls) |
| 715 | 如果error则 |
| 720 | ksys_sync_helper() |
| 726 | lock_device_hotplug() |
| 728 | error等于create_basic_memory_bitmaps() |
| 733 | 如果error或freezer_test_done则转到:Free_bitmaps |
| 736 | 如果in_suspend则 |
| 737 | flags等于0 |
| 739 | 如果hibernation_mode恒等于HIBERNATION_PLATFORM则flags或等于Flags that can be passed from the hibernatig hernel to the "boot" kernel in* the image header. |
| 741 | 如果nocompress则flags或等于SF_NOCOMPRESS_MODE |
| 743 | 否则flags或等于SF_CRC32_MODE |
| 746 | pm_pr_dbg("Writing image.\n") |
| 747 | error等于swsusp_write(flags) |
| 748 | swsusp_free() |
| 749 | 如果非error则 |
| 750 | 如果hibernation_mode恒等于HIBERNATION_TEST_RESUME则snapshot_test = true |
| 755 | in_suspend等于0 |
| 756 | pm_restore_gfp_mask() |
| 757 | 否则 |
| 758 | pm_pr_dbg("Image restored successfully.\n") |
| 761 | Free_bitmaps : |
| 763 | Thaw : |
| 764 | unlock_device_hotplug() |
| 765 | 如果snapshot_test则 |
| 766 | pm_pr_dbg("Checking hibernation image\n") |
| 768 | 如果非error则error等于load_image_and_restore() |
| 771 | thaw_processes() |
| 774 | freezer_test_done = false |
| 775 | Exit : |
| 776 | __pm_notifier_call_chain(Hibernation finished , nr_calls, NULL) |
| 777 | pm_restore_console() |
| 779 | Unlock : |
| 780 | unlock_system_sleep() |
| 781 | 打印信息("hibernation exit\n") |
| 783 | 返回:error |
| 名称 | 描述 |
|---|---|
| try_to_suspend |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |