函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\suspend.c Create Date:2022-07-27 10:58:25
Last Modify:2020-03-17 14:47:48 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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.

函数原型:static int suspend_prepare(suspend_state_t state)

返回类型:int

参数:

类型参数名称
suspend_state_tstate
345  nr_calls等于0
347  如果非sleep_state_supported(state)则返回:负EPERM
350  pm_prepare_console()
352  error等于__pm_notifier_call_chain(Going to suspend the system , - 1, & nr_calls)
353  如果error
354  nr_calls自减
355  转到:Finish
358  trace_suspend_resume(TPS("freeze_processes"), 0, true)
359  error等于suspend_freeze_processes()
360  trace_suspend_resume(TPS("freeze_processes"), 0, false)
361  如果非error则返回:0
364  failed_freeze自加
365  dpm_save_failed_step(SUSPEND_FREEZE)
366  Finish :
367  __pm_notifier_call_chain(Suspend finished , nr_calls, NULL)
368  pm_restore_console()
369  返回:error
调用者
名称描述
enter_stater_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