函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\autosleep.c Create Date:2022-07-27 11:04:10
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:try_to_suspend

函数原型:static void try_to_suspend(struct work_struct *work)

返回类型:void

参数:

类型参数名称
struct work_struct *work
31  如果非pm_get_wakeup_count( & initial_count, true)则转到:out
34  mutex_lock( & Note: it is only safe to mutex_lock(&autosleep_lock) if a wakeup_source* is active, otherwise a deadlock with try_to_suspend() is possible.* Alternatively mutex_lock_interruptible() can be used. This will then fail)
36  如果非pm_save_wakeup_count(initial_count)或Values used for system_state. Ordering of the states must not be changed* as code checks for <, <=, >, >= STATE.不等于SYSTEM_RUNNING
38  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
39  转到:out
42  如果autosleep_state恒等于PM_SUSPEND_ON
43  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
44  返回
46  如果autosleep_state大于等于PM_SUSPEND_MAXhibernate - Carry out system hibernation, including saving the image.
48  否则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.
51  mutex_unlock - release the mutex*@lock: the mutex to be released* Unlock a mutex that has been locked by this task previously.* This function must not be used in interrupt context. Unlocking* of a not locked mutex is not allowed.
53  如果非pm_get_wakeup_count( & final_count, false)则转到:out
60  如果final_count恒等于initial_countschedule_timeout_uninterruptible(HZ / 2)
63  out :
64  queue_up_suspend_work()