函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

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

函数原型:static inline int __rhashtable_replace_fast(struct rhashtable *ht, struct bucket_table *tbl, struct rhash_head *obj_old, struct rhash_head *obj_new, const struct rhashtable_params params)

返回类型:int

参数:

类型参数名称
struct rhashtable *ht
struct bucket_table *tbl
struct rhash_head *obj_old
struct rhash_head *obj_new
const struct rhashtable_paramsparams
1151  __rcupprev
1154  err等于负ENOENT
1159  hash等于rht_head_hashfn(ht, tbl, obj_old, params)
1160  如果hash不等于rht_head_hashfn(ht, tbl, obj_new, params)则返回:负EINVAL
1163  bkt等于rht_bucket_var(tbl, hash)
1164  如果非bkt则返回:负ENOENT
1167  pprev = NULL
1168  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
1171  如果he不等于obj_old
1172  pprev等于next
1173  继续下一循环
1176  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(next, next)
1177  如果pprev
1178  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_new)
1179  rht_unlock(tbl, bkt)
1180  否则
1181  rht_assign_unlock(tbl, bkt, obj_new)
1183  err等于0
1184  转到:unlocked
1187  rht_unlock(tbl, bkt)
1189  unlocked :
1190  返回:err
调用者
名称描述
rhashtable_replace_fasthashtable_replace_fast - replace an object in hash table*@ht: hash table*@obj_old: pointer to hash head inside object being replaced*@obj_new: pointer to hash head inside object which is new*@params: hash table parameters* Replacing an object doesn't