Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:udelay_test_write

Proto:static ssize_t udelay_test_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
const char __user *buf
size_tcount
loff_t *pos
108  If count >= size of lbuf Then Return -EINVAL
111  If copy_from_user(lbuf, buf, count) Then Return -EFAULT
113  lbuf[count] = '\0'
115  ret = sscanf - Unformat a buffer into a list of arguments*@buf: input buffer*@fmt: formatting of buffer*@...: resulting arguments
116  If ret < 1 Then Return -EINVAL
118  Else if ret < 2 Then iters = DEFAULT_ITERATIONS
121  mutex_lock( & udelay_test_lock)
122  udelay_test_usecs = usecs
123  udelay_test_iterations = iters
124  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.
126  Return count