Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:pm_show_wakelocks

Proto:ssize_t pm_show_wakelocks(char *buf, bool show_active)

Type:ssize_t

Parameter:

TypeParameterName
char *buf
boolshow_active
42  str = buf
43  end = buf + PAGE_SIZE
45  mutex_lock( & wakelocks_lock)
47  When node cycle
48  wl = rb_entry(node, structwakelock, node)
49  If active == show_active Then str += scnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
52  If str > buf Then str--
55  str += scnprintf - Format a string and place it in a buffer*@buf: The buffer to place the result into*@size: The size of the buffer, including the trailing null space*@fmt: The format string to use*@
57  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.
58  Return str - buf