函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:kmp_init

函数原型:static struct ts_config *kmp_init(const void *pattern, unsigned int len, gfp_t gfp_mask, int flags)

返回类型:struct ts_config

参数:

类型参数名称
const void *pattern
unsigned intlen
gfp_tgfp_mask
intflags
97  prefix_tbl_len等于lensizeof(unsignedint)
98  priv_size等于kmp的长度加lenprefix_tbl_len
100  conf等于alloc_ts_config(priv_size, gfp_mask)
101  如果是错误则返回:conf
104  flags等于flags
105  kmp等于ts_config_priv(conf)
106  pattern_len等于len
107  compute_prefix_tbl(pattern, len, prefix_tbl, flags)
108  pattern等于prefix_tblprefix_tbl_len
109  如果flags按位与Searches string case insensitively 则以i小于len循环
111  pattern[i]等于toupper(((u8 * )pattern)[i])
112  否则内存复制(pattern, pattern, len)
115  返回:conf