Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:rb_simple_write

Proto:static ssize_t rb_simple_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
8276  tr = needed for tty driver, and maybe others
8277  buffer = buffer
8281  ret = kstrtoul_from_user(ubuf, cnt, 10, & val)
8282  If ret Then Return ret
8285  If buffer Then
8286  mutex_lock( & race_types_lock is used to protect the trace_types list.)
8288  val = 0
8289  Else if val Then
8291  If start Then start(tr)
8293  Else
8295  If stop Then stop(tr)
8298  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.
8301  ppos++
8303  Return cnt