Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\signalfd.c Create Date:2022-07-28 20:19:38
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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".

Proto:static ssize_t signalfd_read(struct file *file, char __user *buf, size_t count, loff_t *ppos)

Type:ssize_t

Parameter:

TypeParameterName
struct file *file
char __user *buf
size_tcount
loff_t *ppos
215  ctx = needed for tty driver, and maybe others
216  __user * siginfo
217  nonblock = f_flags & O_NONBLOCK
218  total = 0
221  count /= sizeof(structsignalfd_siginfo)
222  If Not count Then Return -EINVAL
225  siginfo = buf
226  Do
227  ret = signalfd_dequeue(ctx, & info, nonblock)
228  If Value for the false possibility is greater at compile time(ret <= 0) Then Break
230  ret = Copied from copy_siginfo_to_user() in kernel/signal.c
231  If ret < 0 Then Break
233  siginfo++
234  total += ret
235  nonblock = 1
236  When --count cycle
238  Return If total Then total Else ret