函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Internal function, please use rhashtable_remove_fast() instead

函数原型:static inline int __rhashtable_remove_fast_one(struct rhashtable *ht, struct bucket_table *tbl, struct rhash_head *obj, const struct rhashtable_params params, bool rhlist)

返回类型:int

参数:

类型参数名称
struct rhashtable *ht
struct bucket_table *tbl
struct rhash_head *obj
const struct rhashtable_paramsparams
boolrhlist
999  __rcupprev
1002  err等于负ENOENT
1004  hash等于rht_head_hashfn(ht, tbl, obj, params)
1005  bkt等于rht_bucket_var(tbl, hash)
1006  如果非bkt则返回:负ENOENT
1008  pprev = NULL
1009  We lock a bucket by setting BIT(0) in the pointer - this is always* zero in real pointers. The NULLS mark is never stored in the bucket,* rather we store NULL if the bucket is empty.* bit_spin_locks do not handle contention well, but the whole point
1014  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.(he, structrhlist_head, rhead)
1016  如果he不等于obj
1017  __rculpprev
1019  pprev等于next
1021  如果非rhlist则继续下一循环
1024  循环
1025  lpprev等于next
1028 listobj不等于rhead循环
1030  如果非list则继续下一循环
1033  list等于rht_dereference_bucket(next, tbl, hash)
1034  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( * lpprev, list)
1035  err等于0
1036  退出
1039  obj等于rht_dereference_bucket(next, tbl, hash)
1040  err等于1
1042  如果rhlist
1043  list等于rht_dereference_bucket(next, tbl, hash)
1044  如果list
1046  obj等于rhead
1047  err等于0
1051  如果pprev
1052  cu_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)
1053  rht_unlock(tbl, bkt)
1054  否则
1055  rht_assign_unlock(tbl, bkt, obj)
1057  转到:unlocked
1060  rht_unlock(tbl, bkt)
1061  unlocked :
1062  如果err大于0则
1063  atomic_dec( & nelems)
1064  如果此条件成立可能性小(为编译器优化)(automatic_shrinking && ht_shrink_below_30 - returns true if nelems < 0.3 * table-size*@ht: hash table*@tbl: current table)则schedule_work - put work task in global workqueue*@work: job to be done* Returns %false if @work was already on the kernel-global workqueue and* %true otherwise
1067  err等于0
1070  返回:err
调用者
名称描述
__rhashtable_remove_fastInternal function, please use rhashtable_remove_fast() instead