Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:kfifo_copy_to_user

Proto:static unsigned long kfifo_copy_to_user(struct __kfifo *fifo, void __user *to, unsigned int len, unsigned int off, unsigned int *copied)

Type:unsigned long

Parameter:

TypeParameterName
struct __kfifo *fifo
void __user *to
unsigned intlen
unsigned intoff
unsigned int *copied
241  size = mask + 1
242  esize = esize
244  off &= mask
245  If esize != 1 Then
246  off *= esize
247  size *= esize
248  len *= esize
250  l = min - return minimum of two values of the same or compatible types*@x: first value*@y: second value(len, size - off)
252  ret = copy_to_user(to, data + off, l)
253  If Value for the false possibility is greater at compile time(ret) Then ret = DIV_ROUND_UP(ret + len - l, esize)
255  Else
256  ret = copy_to_user(to + l, data, len - l)
257  If Value for the false possibility is greater at compile time(ret) Then ret = DIV_ROUND_UP(ret, esize)
264  smp_wmb()
265  copied = len - ret * esize
267  Return ret
Caller
NameDescribe
__kfifo_to_user
__kfifo_to_user_r