Function report | 
Source Code:kernel\relay.c | 
Create Date:2022-07-28 11:47:21 | 
| 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_consume - update the consumed count for the buffer
Proto:static void relay_file_read_consume(struct rchan_buf *buf, size_t read_pos, size_t bytes_consumed)
Type:void
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct rchan_buf * | buf | |
| size_t | read_pos | |
| size_t | bytes_consumed | 
| 964 | subbuf_size = sub-buffer size | 
| 968 | If count of sub-buffers produced == count of sub-buffers consumed && current offset into sub-buffer == ytes consumed in cur read subbuf Then Return | 
| 972 | If ytes consumed in cur read subbuf + bytes_consumed > subbuf_size Then | 
| 974 | ytes consumed in cur read subbuf = 0 | 
| 978 | If Not read_pos Then read_subbuf = count of sub-buffers consumed % n_subbufs | 
| 980 | Else read_subbuf = read_pos / sub-buffer size | 
| 982 | If ytes consumed in cur read subbuf + padding counts per sub-buffer [read_subbuf] == subbuf_size Then | 
| 983 | If read_subbuf == count of sub-buffers produced % n_subbufs && current offset into sub-buffer == subbuf_size Then Return | 
| 987 | ytes consumed in cur read subbuf = 0 | 
| Name | Describe | 
|---|---|
| relay_file_read_avail | lay_file_read_avail - boolean, are there unconsumed bytes available? | 
| 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  |