函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\reed_solomon\test_rslib.c Create Date:2022-07-27 07:56:44
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Generates a random codeword and stores it in c

函数原型:static int get_rcw_we(struct rs_control *rs, struct wspace *ws, int len, int errs, int eras)

返回类型:int

参数:

类型参数名称
struct rs_control *rs
struct wspace *ws
intlen
interrs
interas
154  nroots等于nroots
155  derrlocs等于derrlocs
156  errlocs等于errlocs
157  dlen等于lennroots
158  nn等于nn
159  c等于 sent codeword
160  r等于 received word
166 i小于dlen循环c[i]等于prandom_u32()按位与nn
169  memset(c + dlen, 0, nroots * c的长度)
170  encode_rs16(rs, c, dlen, c + dlen, 0)
173  内存复制(r, c, len * r的长度)
174  memset(errlocs, 0, len * errlocs的长度)
175  memset(derrlocs, 0, nroots * derrlocs的长度)
178 i小于errs循环
179  循环
181  errval等于prandom_u32()按位与nn
182 errval恒等于0循环
184  循环
186  errloc等于prandom_u32()取模len
187 errlocs[errloc]不等于0循环
189  errlocs[errloc]等于1
190  r[errloc]异或等于errval
194 i小于eras循环
195  循环
197  errloc等于prandom_u32()取模len
198 errlocs[errloc]不等于0循环
200  derrlocs[i]等于errloc
202  如果ewscprandom_u32()按位与1则
204  errlocs[errloc]等于2
205  否则
207  循环
209  errval等于prandom_u32()按位与nn
210 errval恒等于0循环
212  errlocs[errloc]等于1
213  r[errloc]异或等于errval
214  errs自加
218  返回:errs
调用者
名称描述
test_ucTest up to error correction capacity
test_bcTests for correct behaviour beyond error correction capacity