Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:include\linux\jhash.h Create Date:2022-07-28 06:07:00
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static inline u32 jhash2(const u32 *k, u32 length, u32 initval)

Type:u32

Parameter:

TypeParameterName
const u32 *k
u32length
u32initval
121  a = b = c = An arbitrary initial parameter + (length << 2) + initval
124  When length > 3 cycle
125  a += k[0]
126  b += k[1]
127  c += k[2]
129  length -= 3
130  k += 3
135  Case length == 3
135  c += k[2]
136  Case length == 2
136  b += k[1]
137  Case length == 1
137  a += k[0]
139  Case length == 0
140  Break
143  Return c
Caller
NameDescribe
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