函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:jhash2 - hash an array of u32's*@k: the key which must be an array of u32's*@length: the number of u32's in the key*@initval: the previous hash, or an arbitray value* Returns the hash value of the key.

函数原型:static inline u32 jhash2(const u32 *k, u32 length, u32 initval)

返回类型:u32

参数:

类型参数名称
const u32 *k
u32length
u32initval
121  a等于b等于c等于An arbitrary initial parameter length左移2位的值加initval
124 length大于3循环
125  a加等于k[0]
126  b加等于k[1]
127  c加等于k[2]
129  length减等于3
130  k加等于3
135  :length恒等于3
135  c加等于k[2]
136  :length恒等于2
136  b加等于k[1]
137  :length恒等于1
137  a加等于k[0]
139  :length恒等于0
140  退出
143  返回:c
调用者
名称描述
rhashtable_jhash2
hash_stack
hash_futexhash_futex - Return the hash bucket in the global hash*@key: Pointer to the futex key for which the hash is calculated* We hash on the keys returned from get_futex_key (see below) and return the* corresponding hash bucket in the global hash.
____bpf_get_stackid
rht_key_get_hash
ipv6_portaddr_hash
rhashtable_jhash2