Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:hashtable_init - initialize a new hash table*@ht: hash table to be initialized*@params: configuration parameters* Initializes a new hash table based on the provided configuration* parameters

Proto:int rhashtable_init(struct rhashtable *ht, const struct rhashtable_params *params)

Type:int

Parameter:

TypeParameterName
struct rhashtable *ht
const struct rhashtable_params *params
1014  If Not key_len && Not obj_hashfn || obj_hashfn && Not obj_cmpfn Then Return -EINVAL
1018  memset(ht, 0, size of ht )
1019  mutex_init - initialize the mutex*@mutex: the mutex to be initialized* Initialize the mutex to unlocked state.* It is not allowed to initialize an already locked mutex.( & mutex)
1020  Process spin lock initialization( & lock)
1021  No 3D Now!( & p, params, size of params )
1023  If min_size Then min_size = undup_pow_of_two - round the given value up to nearest power of two*@n: parameter* round the given value up to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(min_size)
1027  max_elems = 1u << 31
1029  If max_size Then
1030  max_size = unddown_pow_of_two - round the given value down to nearest power of two*@n: parameter* round the given value down to the nearest power of two* - the result is undefined when n == 0* - this can be used to initialise global variables from constant data(max_size)
1031  If max_size < max_elems / 2 Then max_elems = max_size * 2
1035  min_size = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u16, min_size, HASH_MIN_SIZE)
1037  size = rounded_hashtable_size( & p)
1039  key_len = key_len
1040  If Not hashfn Then
1041  hashfn = jhash - hash an arbitrary key*@k: sequence of bytes as key*@length: the length of the key*@initval: the previous hash, or an arbitray value* The generic version, hashes an arbitrary sequence of bytes.
1043  If Not (key_len & sizeof(u32) - 1 ) Then
1044  key_len /= sizeof(u32)
1054  tbl = bucket_table_alloc(ht, size, GFP_KERNEL)
1055  If Value for the false possibility is greater at compile time(tbl == NULL) Then
1056  size = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u16, min_size, HASH_MIN_SIZE)
1057  tbl = bucket_table_alloc(ht, size, GFP_KERNEL | __GFP_NOFAIL)
1060  atomic_set( & nelems, 0)
1062  RCU_INIT_POINTER() - initialize an RCU protected pointer*@p: The pointer to be initialized.*@v: The value to initialized the pointer to.* Initialize an RCU-protected pointer in special cases where readers(tbl, tbl)
1064  INIT_WORK( & run_work, rht_deferred_worker)
1066  Return 0
Caller
NameDescribe
rhltable_inithltable_init - initialize a new hash list table*@hlt: hash list table to be initialized*@params: configuration parameters* Initializes a new hash list table.* See documentation for rhashtable_init.
test_rhashtable_max
test_rht_init
objagg_createbjagg_create - creates a new objagg instance*@ops: user-specific callbacks*@objagg_hints: hints, can be NULL*@priv: pointer to a private data passed to the ops* Note: all locking must be provided by the caller
objagg_hints_getbjagg_hints_get - obtains hints instance*@objagg: objagg instance*@opt_algo_type: type of hints finding algorithm* Note: all locking must be provided by the caller.* According to the algo type, the existing objects of objagg instance