函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kfifo_copy_from_user

函数原型:static unsigned long kfifo_copy_from_user(struct __kfifo *fifo, const void __user *from, unsigned int len, unsigned int off, unsigned int *copied)

返回类型:unsigned long

参数:

类型参数名称
struct __kfifo *fifo
const void __user *from
unsigned intlen
unsigned intoff
unsigned int *copied
179  size等于mask加1
180  esize等于esize
184  off与等于mask
185  如果esize不等于1则
186  off乘等于esize
187  size乘等于esize
188  len乘等于esize
190  l等于两数取小(len, size - off)
192  ret等于copy_from_user(data + off, from, l)
193  如果此条件成立可能性小(为编译器优化)(ret)则ret等于DIV_ROUND_UP(ret + len - l, esize)
195  否则
196  ret等于copy_from_user(data, from + l, len - l)
197  如果此条件成立可能性小(为编译器优化)(ret)则ret等于DIV_ROUND_UP(ret, esize)
204  smp_wmb()
205  copied等于lenretesize
207  返回:ret
调用者
名称描述
__kfifo_from_user
__kfifo_from_user_r