Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:event_trigger_regex_write

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

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *ubuf
size_tcnt
loff_t *ppos
247  If Not cnt Then Return 0
250  If cnt >= PAGE_SIZE Then Return -EINVAL
253  buf = memdup_user_nul(ubuf, cnt)
254  If IS_ERR(buf) Then Return PTR_ERR(buf)
257  strim - Removes leading and trailing whitespace from @s.*@s: The string to be stripped.* Note that the first trailing whitespace is replaced with a %NUL-terminator* in the given string @s. Returns a pointer to the first non-whitespace* character in @s.
259  mutex_lock( & event_mutex)
260  event_file = event_file_data(file)
261  If Value for the false possibility is greater at compile time(!event_file) Then
262  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.
263  kfree(buf)
264  Return -ENODEV
266  ret = trigger_process_regex(event_file, buf)
267  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.
269  kfree(buf)
270  If ret < 0 Then Go to out
273  ppos += cnt
274  ret = cnt
275  out :
276  Return ret
Caller
NameDescribe
event_trigger_write