函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\signalfd.c Create Date:2022-07-29 10:51:32
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Returns a multiple of the size of a "struct signalfd_siginfo", or a negative* error code. The "count" parameter must be at least the size of a* "struct signalfd_siginfo".

函数原型:static ssize_t signalfd_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)

返回类型:ssize_t

参数:

类型参数名称
struct file *file
char __user *buf
size_tcount
loff_t *ppos
215  ctx等于 needed for tty driver, and maybe others
216  __usersiginfo
217  nonblock等于f_flags按位与O_NONBLOCK
218  total等于0
221  count除等于sizeof(structsignalfd_siginfo)
222  如果非count则返回:负EINVAL
225  siginfo等于buf
226  循环
227  ret等于signalfd_dequeue(ctx, & info, nonblock)
228  如果此条件成立可能性小(为编译器优化)(ret <= 0)则退出
230  ret等于Copied from copy_siginfo_to_user() in kernel/signal.c
231  如果ret小于0则退出
233  siginfo自加
234  total加等于ret
235  nonblock等于1
236 count先自减循环
238  返回:如果totaltotal否则ret