函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\relay.c Create Date:2022-07-27 12:52:15
Last Modify:2020-03-17 19:20:22 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:lay_file_read_subbuf_avail - return bytes available in sub-buffer*@read_pos: file read position*@buf: relay channel buffer

函数原型:static size_t relay_file_read_subbuf_avail(size_t read_pos, struct rchan_buf *buf)

返回类型:size_t

参数:

类型参数名称
size_tread_pos
struct rchan_buf *buf
1041  avail等于0
1043  subbuf_size等于 sub-buffer size
1045  write_subbuf等于start of current sub-buffer start of channel buffer 的差除subbuf_size
1046  write_offset等于如果current offset into sub-buffer 大于subbuf_sizesubbuf_size否则current offset into sub-buffer
1047  read_subbuf等于read_possubbuf_size
1048  read_offset等于read_pos取模subbuf_size
1049  padding等于padding counts per sub-buffer [read_subbuf]
1051  如果read_subbuf恒等于write_subbuf
1052  如果read_offsetpadding小于write_offsetavail等于write_offsetread_offsetpadding
1054  否则avail等于subbuf_sizepaddingread_offset
1057  返回:avail
调用者
名称描述
relay_file_read