Function report |
Source Code:kernel\power\suspend.c |
Create Date:2022-07-28 09:58:25 |
| Last Modify:2020-03-17 14:47:48 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name: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
Proto:static int enter_state(suspend_state_t state)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| suspend_state_t | state |
| 551 | trace_suspend_resume(TPS("suspend_enter"), state, true) |
| 552 | If state == PM_SUSPEND_TO_IDLE Then Else if Not valid_state(state) Then |
| 560 | Return -EINVAL |
| 562 | If Not mutex_trylock - try to acquire the mutex, without waiting*@lock: the mutex to be acquired* Try to acquire the mutex atomically Then Return -EBUSY |
| 565 | If state == PM_SUSPEND_TO_IDLE Then s2idle_begin() |
| 569 | trace_suspend_resume(TPS("sync_filesystems"), 0, true) |
| 570 | ksys_sync_helper() |
| 571 | trace_suspend_resume(TPS("sync_filesystems"), 0, false) |
| 574 | pm_pr_dbg("Preparing system for sleep (%s)\n", mem_sleep_labels[state]) |
| 575 | pm_suspend_clear_flags() |
| 580 | If suspend_test(TEST_FREEZER) Then Go to Finish |
| 583 | trace_suspend_resume(TPS("suspend_enter"), state, false) |
| 584 | pm_pr_dbg("Suspending system (%s)\n", mem_sleep_labels[state]) |
| 585 | pm_restrict_gfp_mask() |
| 586 | error = suspend_devices_and_enter - Suspend devices and enter system sleep state.*@state: System sleep state to enter. |
| 587 | pm_restore_gfp_mask() |
| 589 | Finish : |
| 590 | events_check_enabled = false |
| 591 | pm_pr_dbg("Finishing wakeup.\n") |
| 593 | Unlock : |
| 595 | Return error |
| Name | Describe |
|---|---|
| pm_suspend | pm_suspend - Externally visible function for suspending the system.*@state: System sleep state to enter.* Check if the value of @state represents one of the supported states,* execute enter_state() and update system suspend statistics. |
| 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 |