函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:pm_autosleep_set_state

函数原型:int pm_autosleep_set_state(suspend_state_t state)

返回类型:int

参数:

类型参数名称
suspend_state_tstate
94  如果state大于等于PM_SUSPEND_MAX则返回:负EINVAL
98  __pm_stay_awake(autosleep_ws)
100  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)
102  autosleep_state等于state
104  __pm_relax(autosleep_ws)
106  如果state大于PM_SUSPEND_ON
107  pm_wakep_autosleep_enabled(true)
108  queue_up_suspend_work()
109  否则
110  pm_wakep_autosleep_enabled(false)
113  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.
114  返回:0