Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_signalfd4

Proto:static int do_signalfd4(int ufd, sigset_t *mask, int flags)

Type:int

Parameter:

TypeParameterName
intufd
sigset_t *mask
intflags
268  BUILD_BUG_ON - break compile if a condition is true(Flags for signalfd4. != O_CLOEXEC)
269  BUILD_BUG_ON - break compile if a condition is true(SFD_NONBLOCK != O_NONBLOCK)
271  If flags & ~(Flags for signalfd4. | SFD_NONBLOCK) Then Return -EINVAL
274  sigdelsetmask(mask, sigmask(SIGKILL) | sigmask(SIGSTOP))
275  signotset(mask)
277  If ufd == -1 Then
278  ctx = Allocation memory
279  If Not ctx Then Return -ENOMEM
282  sigmask = mask
288  ufd = anon_inode_getfd - creates a new file instance by hooking it up to an* anonymous inode, and a dentry that describe the "class"* of the file*@name: [in] name of the "class" of the new file*@fops: [in] file operations for the new file*@priv: [in] private
290  If ufd < 0 Then kfree(ctx)
292  Else
293  f = fdget(ufd)
294  If Not file Then Return -EBADF
296  ctx = needed for tty driver, and maybe others
297  If f_op != signalfd_fops Then
298  fdput(f)
299  Return -EINVAL
301  spin_lock_irq( & siglock)
302  sigmask = mask
303  spin_unlock_irq( & siglock)
305  wake_up( & signalfd_wqh)
306  fdput(f)
309  Return ufd
Caller
NameDescribe
SYSCALL_DEFINE4
SYSCALL_DEFINE3
do_compat_signalfd4