Function report | 
Source Code:kernel\power\suspend.c | 
Create Date:2022-07-28 09:58:16 | 
| Last Modify:2020-03-17 14:47:48 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:suspend_prepare - Prepare for entering system sleep state.* Common code run for every system sleep state that can be entered (except for* hibernation). Run suspend notifiers, allocate the "suspend" console and* freeze processes.
Proto:static int suspend_prepare(suspend_state_t state)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| suspend_state_t | state | 
| 345 | nr_calls = 0 | 
| 347 | If Not sleep_state_supported(state) Then Return -EPERM | 
| 350 | pm_prepare_console() | 
| 352 | error = __pm_notifier_call_chain(Going to suspend the system , - 1, & nr_calls) | 
| 353 | If error Then | 
| 358 | trace_suspend_resume(TPS("freeze_processes"), 0, true) | 
| 359 | error = suspend_freeze_processes() | 
| 360 | trace_suspend_resume(TPS("freeze_processes"), 0, false) | 
| 361 | If Not error Then Return 0 | 
| 364 | failed_freeze++ | 
| 366 | Finish : | 
| 367 | __pm_notifier_call_chain(Suspend finished , nr_calls, NULL) | 
| 368 | pm_restore_console() | 
| 369 | Return error | 
| Name | Describe | 
|---|---|
| enter_state | r_state - Do common work needed to enter system sleep state.*@state: System sleep state to enter.* Make sure that no one else is trying to put the system into a sleep state.* Fail if that's not the case. Otherwise, prepare for system suspend, make the | 
| 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  |