Function report |
Source Code:kernel\relay.c |
Create Date:2022-07-28 11:47:25 |
Last Modify:2020-03-17 19:20:22 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:lay_file_read_subbuf_avail - return bytes available in sub-buffer*@read_pos: file read position*@buf: relay channel buffer
Proto:static size_t relay_file_read_subbuf_avail(size_t read_pos, struct rchan_buf *buf)
Type:size_t
Parameter:
Type | Parameter | Name |
---|---|---|
size_t | read_pos | |
struct rchan_buf * | buf |
1041 | avail = 0 |
1043 | subbuf_size = sub-buffer size |
1046 | write_offset = If current offset into sub-buffer > subbuf_size Then subbuf_size Else current offset into sub-buffer |
1047 | read_subbuf = read_pos / subbuf_size |
1048 | read_offset = read_pos % subbuf_size |
1051 | If read_subbuf == write_subbuf Then |
1052 | If read_offset + padding < write_offset Then avail = write_offset - read_offset + padding |
1054 | Else avail = subbuf_size - padding - read_offset |
1057 | Return avail |
Name | Describe |
---|---|
relay_file_read |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |