函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:lay_file_read_consume - update the consumed count for the buffer

函数原型:static void relay_file_read_consume(struct rchan_buf *buf, size_t read_pos, size_t bytes_consumed)

返回类型:void

参数:

类型参数名称
struct rchan_buf *buf
size_tread_pos
size_tbytes_consumed
964  subbuf_size等于 sub-buffer size
965  n_subbufs等于 number of sub-buffers per buffer
968  如果count of sub-buffers produced 恒等于count of sub-buffers consumed current offset into sub-buffer 恒等于ytes consumed in cur read subbuf 则返回
972  如果ytes consumed in cur read subbuf bytes_consumed大于subbuf_size
973  lay_subbufs_consumed - update the buffer's sub-buffers-consumed count*@chan: the channel*@cpu: the cpu associated with the channel buffer to update*@subbufs_consumed: number of sub-buffers to add to current buf's count
974  ytes consumed in cur read subbuf 等于0
977  ytes consumed in cur read subbuf 加等于bytes_consumed
978  如果非read_posread_subbuf等于count of sub-buffers consumed 取模n_subbufs
980  否则read_subbuf等于read_pos sub-buffer size
982  如果ytes consumed in cur read subbuf padding counts per sub-buffer [read_subbuf]恒等于subbuf_size
983  如果read_subbuf恒等于count of sub-buffers produced 取模n_subbufscurrent offset into sub-buffer 恒等于subbuf_size则返回
986  lay_subbufs_consumed - update the buffer's sub-buffers-consumed count*@chan: the channel*@cpu: the cpu associated with the channel buffer to update*@subbufs_consumed: number of sub-buffers to add to current buf's count
987  ytes consumed in cur read subbuf 等于0
调用者
名称描述
relay_file_read_availlay_file_read_avail - boolean, are there unconsumed bytes available?
relay_file_read