函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\regset.h Create Date:2022-07-27 08:49:18
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:These two parallel the two above, but for portions of a regset layout* that always read as all-zero or for which writes are ignored.

函数原型:static inline int user_regset_copyout_zero(unsigned int *pos, unsigned int *count, void **kbuf, void __user **ubuf, const int start_pos, const int end_pos)

返回类型:int

参数:

类型参数名称
unsigned int *pos
unsigned int *count
void **kbuf
void __user **ubuf
const intstart_pos
const intend_pos
314  如果count恒等于0则返回:0
316  BUG_ON( * pos < start_pos)
317  如果end_pos小于0或pos小于end_pos
318  copy等于如果end_pos小于0则count否则两数取小( * count, end_pos - * pos)
320  如果kbuf
321  memset( * kbuf, 0, copy)
322  kbuf加等于copy
323  否则如果以最小的代价用户内存块清零则返回:负EFAULT
325  否则ubuf加等于copy
327  pos加等于copy
328  count减等于copy
330  返回:0