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:27
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:event_enable_write

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

Type:ssize_t

Parameter:

TypeParameterName
struct file *filp
const char __user *ubuf
size_tcnt
loff_t *ppos
1090  ret = kstrtoul_from_user(ubuf, cnt, 10, & val)
1091  If ret Then Return ret
1094  ret = racing_update_buffers - used by tracing facility to expand ring buffers* To save on memory when the tracing is never used on a system with it* configured in
1095  If ret < 0 Then Return ret
1099  Case val == 0
1100  Case val == 1
1101  ret = -ENODEV
1102  mutex_lock( & event_mutex)
1103  file = event_file_data(filp)
1104  If Value is more likely to compile time(file) Then ret = ftrace_event_enable_disable(file, val)
1106  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.
1107  Break
1109  Default
1110  Return -EINVAL
1113  ppos += cnt
1115  Return If ret Then ret Else cnt