函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\test_udelay.c Create Date:2022-07-27 11:52:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:udelay_test_write

函数原型:static ssize_t udelay_test_write(struct file *file, const char __user *buf, size_t count, loff_t *pos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
const char __user *buf
size_tcount
loff_t *pos
108  如果count大于等于lbuf的长度则返回:负EINVAL
111  如果copy_from_user(lbuf, buf, count)则返回:负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  如果ret小于1则返回:负EINVAL
118  否则如果ret小于2则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  返回:count