Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\power\wakelock.c Create Date:2022-07-28 10:04:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:pm_wake_unlock

Proto:int pm_wake_unlock(const char *buf)

Type:int

Parameter:

TypeParameterName
const char *buf
258  ret = 0
260  If Not Check operation authority Then Return -EPERM
263  len = strlen - Find the length of a string*@s: The string to be sized
264  If Not len Then Return -EINVAL
267  If buf[len - 1] == '\n' Then len--
270  If Not len Then Return -EINVAL
273  mutex_lock( & wakelocks_lock)
275  wl = wakelock_lookup_add(buf, len, false)
276  If IS_ERR(wl) Then
277  ret = PTR_ERR(wl)
278  Go to out
280  __pm_relax(ws)
282  wakelocks_lru_most_recent(wl)
283  wakelocks_gc()
285  out :
286  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.
287  Return ret