Function report |
Source Code:kernel\power\user.c |
Create Date:2022-07-28 10:03:42 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:snapshot_open
Proto:static int snapshot_open(struct inode *inode, struct file *filp)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct inode * | inode | |
struct file * | filp |
47 | nr_calls = 0 |
49 | If Not hibernation_available() Then Return -EPERM |
52 | lock_system_sleep() |
64 | nonseekable_open(inode, filp) |
65 | data = snapshot_state |
67 | memset( & handle, 0, sizeof(structsnapshot_handle)) |
70 | swap = If swsusp_resume_device Then swap_type_of(swsusp_resume_device, 0, NULL) Else -1 |
73 | free_bitmaps = false |
74 | error = __pm_notifier_call_chain(Going to hibernate , - 1, & nr_calls) |
75 | If error Then __pm_notifier_call_chain(Hibernation finished , --nr_calls, NULL) |
77 | Else |
84 | swap = -1 |
86 | error = __pm_notifier_call_chain(Going to restore a saved image , - 1, & nr_calls) |
87 | If Not error Then |
89 | free_bitmaps = Not error |
90 | Else nr_calls-- |
93 | If error Then __pm_notifier_call_chain(Restore failed , nr_calls, NULL) |
96 | If error Then atomic_inc( & snapshot_device_available) |
99 | frozen = false |
100 | ready = false |
101 | platform_support = false |
103 | Unlock : |
104 | unlock_system_sleep() |
106 | Return error |
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 |