Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\lock_events.c Create Date:2022-07-28 09:55:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:The lockevent_read() function can be overridden.

Proto:ssize_t __weak lockevent_read(struct file *file, char __user *user_buf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char __user *user_buf
size_tcount
loff_t *ppos
66  sum = 0
71  id = i_private
73  If id >= # of write lock handoffs Then Return -EBADF
76  for_each_possible_cpu(cpu)
77  sum += per_cpu(Per-cpu counts[id], cpu)
78  len = snprintf - 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*@
80  Return simple_read_from_buffer(user_buf, count, ppos, buf, len)