函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:create_pipe_files

函数原型:int create_pipe_files(struct file **res, int flags)

返回类型:int

参数:

类型参数名称
struct file **res
intflags
883  inode等于get_pipe_inode()
886  如果非inode则返回:负ENFILE
889  f等于alloc_file_pseudo(inode, pipe_mnt, "", O_WRONLY | (flags & (O_NONBLOCK | O_DIRECT)), & pipe.c)
892  如果是错误
893  free_pipe_info(i_pipe)
894  放置一个索引节点
895  返回:错误
898  needed for tty driver, and maybe others 等于i_pipe
900  res[0]等于alloc_file_clone(f, O_RDONLY | (flags & O_NONBLOCK), & pipe.c)
902  如果是错误
903  put_pipe_info(inode, i_pipe)
904  fput(f)
905  返回:错误
907  needed for tty driver, and maybe others 等于i_pipe
908  res[1]等于f
909  stream_open is used by subsystems that want stream-like file descriptors.* Such file descriptors are not seekable and don't have notion of position* (file.f_pos is always 0 and ppos passed to .read()/.write() is always NULL).
910  stream_open is used by subsystems that want stream-like file descriptors.* Such file descriptors are not seekable and don't have notion of position* (file.f_pos is always 0 and ppos passed to .read()/.write() is always NULL).
911  返回:0
调用者
名称描述
umh_pipe_setup
__do_pipe_flags
umh_pipe_setupmh_pipe_setup* helper function to customize the process used* to collect the core in userspace. Specifically* it sets up a pipe and installs it as fd 0 (stdin)* for the process. Returns 0 on success, or* PTR_ERR on failure.