函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称: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

函数原型:int rhashtable_init(struct rhashtable *ht, const struct rhashtable_params *params)

返回类型:int

参数:

类型参数名称
struct rhashtable *ht
const struct rhashtable_params *params
1014  如果非key_len且非obj_hashfnobj_hashfn且非obj_cmpfn则返回:负EINVAL
1018  memset(ht, 0, 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  spin_lock_init( & lock)
1021  内存复制( & p, params, params的长度)
1023  如果min_sizemin_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  如果max_size
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  如果max_size小于max_elems除2则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  如果非hashfn
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  如果非key_len按位与sizeof(u32)减1的值则
1044  key_len除等于sizeof(u32)
1054  tbl等于bucket_table_alloc(ht, size, GFP_KERNEL)
1055  如果此条件成立可能性小(为编译器优化)(tbl == NULL)则
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  返回:0
调用者
名称描述
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
bpf_offload_dev_create
ipc_init_idspc_init_ids - initialise ipc identifiers*@ids: ipc identifier set* Set up the sequence range to use for the ipc identifier range (limited* below ipc_mni) then initialise the keys hashtable and ids idr.
unpack_profilepack_profile - unpack a serialized profile*@e: serialized data extent information (NOT NULL)* NOTE: unpack profile sets audit struct if there is a failure