函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:do_signalfd4

函数原型:static int do_signalfd4(int ufd, sigset_t *mask, int flags)

返回类型:int

参数:

类型参数名称
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  如果flags按位与Flags for signalfd4. 按位或SFD_NONBLOCK的值的反则返回:负EINVAL
274  sigdelsetmask(mask, sigmask(SIGKILL) | sigmask(SIGSTOP))
275  signotset(mask)
277  如果ufd恒等于负1则
278  ctx等于开辟内存
279  如果非ctx则返回:负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  如果ufd小于0则释放内存
292  否则
293  f等于fdget(ufd)
294  如果非file则返回:负EBADF
296  ctx等于 needed for tty driver, and maybe others
297  如果f_op不等于signalfd_fops
298  fdput(f)
299  返回:负EINVAL
301  spin_lock_irq( & siglock)
302  sigmask等于mask
303  spin_unlock_irq( & siglock)
305  wake_up( & signalfd_wqh)
306  fdput(f)
309  返回:ufd
调用者
名称描述
SYSCALL_DEFINE4
SYSCALL_DEFINE3
do_compat_signalfd4