Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\ts_kmp.c Create Date:2022-07-28 07:10:26
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kmp_init

Proto:static struct ts_config *kmp_init(const void *pattern, unsigned int len, gfp_t gfp_mask, int flags)

Type:struct ts_config

Parameter:

TypeParameterName
const void *pattern
unsigned intlen
gfp_tgfp_mask
intflags
97  prefix_tbl_len = len * sizeof(unsignedint)
98  priv_size = size of kmp + len + prefix_tbl_len
100  conf = alloc_ts_config(priv_size, gfp_mask)
101  If IS_ERR(conf) Then Return 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_tbl + prefix_tbl_len
109  If flags & Searches string case insensitively Then When i < len cycle
111  pattern[i] = toupper(((u8 * )pattern)[i])
112  Else No 3D Now!(pattern, pattern, len)
115  Return conf