函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Link contents of ipipe to opipe.

函数原型:static int link_pipe(struct pipe_inode_info *ipipe, struct pipe_inode_info *opipe, size_t len, unsigned int flags)

返回类型:int

参数:

类型参数名称
struct pipe_inode_info *ipipe
struct pipe_inode_info *opipe
size_tlen
unsigned intflags
1682  ret等于0
1689  pipe_double_lock(ipipe, opipe)
1691  i_tail等于tail
1692  i_mask等于ring_size减1
1693  o_head等于head
1694  o_mask等于ring_size减1
1696  循环
1697  如果非readers
1699  如果非retret等于负EPIPE
1701  退出
1704  i_head等于head
1705  o_tail等于tail
1711  如果pipe_empty - Return true if the pipe is empty*@head: The pipe ring head pointer*@tail: The pipe ring tail pointerpipe_full - Return true if the pipe is full*@head: The pipe ring head pointer*@tail: The pipe ring tail pointer*@limit: The maximum amount of slots available.退出
1715  ibuf等于bufs[i_tail & i_mask]
1716  obuf等于bufs[o_head & o_mask]
1723  如果ret恒等于0则ret等于负EFAULT
1725  退出
1728  obuf等于ibuf
1734  flags与等于page is a gift 的反
1736  pipe_buf_mark_unmergeable - mark a &struct pipe_buffer as unmergeable*@buf: the buffer to mark* Description:* This function ensures that no future writes will be merged into the* given &struct pipe_buffer. This is necessary when multiple pipe buffers
1738  如果len大于lenlen等于len
1740  ret加等于len
1741  len减等于len
1743  o_head自加
1744  head等于o_head
1745  i_tail自加
1746 len循环
1748  pipe_unlock(ipipe)
1749  pipe_unlock(opipe)
1754  如果ret大于0则wakeup_pipe_readers(opipe)
1757  返回:ret
调用者
名称描述
do_teeThis is a tee(1) implementation that works on pipes. It doesn't copy* any data, it simply references the 'in' pages on the 'out' pipe.* The 'flags' used are the SPLICE_F_* variants, currently the only* applicable one is SPLICE_F_NONBLOCK.