| Function report | 
| Source Code: kernel\power\hibernate.c | Create Date:2022-07-28 09:59:29 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:software_resume - Resume from a saved hibernation image.* This routine is called as a late initcall, when all devices have been* discovered and initialized already.* The image reading code is called to see if there is a hibernation image
Proto:static int software_resume(void)
Type:int
Parameter:Nothing
| 804 | nr_calls = 0 | 
| 809 | If noresume || Not hibernation_available() Then Return 0 | 
| 824 | If swsusp_resume_device Then Go to Check_image | 
| 827 | If Not strlen - Find the length of a string*@s: The string to be sized Then | 
| 832 | pm_pr_dbg("Checking hibernation image partition %s\n", resume_file) | 
| 834 | If resume_delay Then | 
| 835 | pr_info("Waiting %dsec before reading resume device ...\n", resume_delay) | 
| 837 | ssleep(resume_delay) | 
| 847 | If isdigit(resume_file[0]) && resume_wait Then | 
| 850 | msleep(10) | 
| 853 | If Not swsusp_resume_device Then | 
| 858 | wait_for_device_probe() | 
| 860 | If resume_wait Then | 
| 861 | When (swsusp_resume_device = name_to_dev_t(resume_file)) == 0 cycle | 
| 862 | msleep(10) | 
| 867 | If Not swsusp_resume_device Then | 
| 873 | Check_image : | 
| 874 | pm_pr_dbg("Hibernation image partition %d:%d present\n", MAJOR(swsusp_resume_device), MINOR(swsusp_resume_device)) | 
| 877 | pm_pr_dbg("Looking for hibernation image.\n") | 
| 889 | pr_info("resume from hibernation\n") | 
| 890 | pm_prepare_console() | 
| 891 | error = __pm_notifier_call_chain(Going to restore a saved image , - 1, & nr_calls) | 
| 892 | If error Then | 
| 893 | nr_calls-- | 
| 894 | Go to Close_Finish | 
| 897 | pm_pr_dbg("Preparing processes for restore.\n") | 
| 899 | If error Then Go to Close_Finish | 
| 901 | error = load_image_and_restore() | 
| 902 | thaw_processes() | 
| 903 | Finish : | 
| 904 | __pm_notifier_call_chain(Restore failed , nr_calls, NULL) | 
| 905 | pm_restore_console() | 
| 909 | Unlock : | 
| 911 | pm_pr_dbg("Hibernation image not present or could not be loaded.\n") | 
| 912 | Return error | 
| 913 | Close_Finish : | 
| 915 | Go to Finish | 
| Name | Describe | 
|---|---|
| resume_store | 
| Source code conversion tool public plug-in interface | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |