函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:rhashtable_lookup_one

函数原型:static void *rhashtable_lookup_one(struct rhashtable *ht, struct rhash_lock_head **bkt, struct bucket_table *tbl, unsigned int hash, const void *key, struct rhash_head *obj)

返回类型:void

参数:

类型参数名称
struct rhashtable *ht
struct rhash_lock_head **bkt
struct bucket_table *tbl
unsigned inthash
const void *key
struct rhash_head *obj
483  struct rhashtable_compare_arg arg = {ht = ht, key = key, }
487  struct rhash_head __rcu * * pprev = NULL
491  elasticity等于Maximum chain length before rehash* The maximum (not average) chain length grows with the size of the hash* table, at a rate of (log N)/(log log N)
496  elasticity自减
497  如果非key或如果obj_cmpfnobj_cmpfn( & arg, rht_obj(ht, head))否则rhashtable_compare( & arg, rht_obj(ht, head))则
501  pprev等于next
502  继续下一循环
505  如果非rhlist则返回:rht_obj(ht, head)
508  list等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(obj, structrhlist_head, rhead)
509  plist等于container_of - cast a member of a structure out to the containing structure*@ptr: the pointer to the member.*@type: the type of the container struct this is embedded in.*@member: the name of the member within the struct.(head, structrhlist_head, rhead)
511  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(next, plist)
512  head等于rht_dereference_bucket(next, tbl, hash)
513  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(next, head)
514  如果pprevcu_assign_pointer() - assign to RCU-protected pointer*@p: pointer to assign to*@v: value to assign (publish)* Assigns the specified value to the specified RCU-protected* pointer, ensuring that any concurrent RCU readers will see* any prior initialization( * pprev, obj)
516  否则rht_assign_locked(bkt, obj)
520  返回:NULL
523  如果elasticity小于等于0则返回:错误号
526  返回:错误号
调用者
名称描述
rhashtable_try_insert