Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_events.c Create Date:2022-07-28 12:19:43
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:event_filter_read

Proto:static ssize_t event_filter_read(struct file *filp, char __user *ubuf, size_t cnt, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *filp
char __user *ubuf
size_tcnt
loff_t *ppos
1358  r = -ENODEV
1360  If ppos Then Return 0
1363  s = Allocation memory
1365  If Not s Then Return -ENOMEM
1368  trace_seq_init(s)
1370  mutex_lock( & event_mutex)
1371  file = event_file_data(filp)
1372  If file Then aller must hold event_mutex
1374  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.
1376  If file Then r = simple_read_from_buffer(ubuf, cnt, ppos, buffer, race_seq_used - amount of actual data written to buffer*@s: trace sequence descriptor* Returns the amount of data written to the buffer.* IMPORTANT!* Use this instead of @s->seq.len if you need to pass the amount)
1380  kfree(s)
1382  Return r