函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:rhashtable_rehash_one

函数原型:static int rhashtable_rehash_one(struct rhashtable *ht, struct rhash_lock_head **bkt, unsigned int old_hash)

返回类型:int

参数:

类型参数名称
struct rhashtable *ht
struct rhash_lock_head **bkt
unsigned intold_hash
219  old_tbl等于rht_dereference(tbl, ht)
220  new_tbl等于rhashtable_last_table(ht, old_tbl)
221  err等于负EAGAIN
223  struct rhash_head __rcu * * pprev = NULL
226  如果nest则转到:out
229  err等于负ENOENT
233  err等于0
234  next等于rht_dereference_bucket(next, old_tbl, old_hash)
236  如果rht_is_a_nulls(next)则退出
239  pprev等于next
242  如果err则转到:out
245  new_hash等于head_hashfn(ht, new_tbl, entry)
247  rht_lock_nested(new_tbl, & buckets[new_hash], For trivial one-depth nesting of a lock-class, the following* global define can be used. (Subsystems with multiple levels* of nesting should define their own lock-nesting subclasses.))
249  head等于rht_ptr(buckets + new_hash, new_tbl, new_hash)
251  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)
253  rht_assign_unlock(new_tbl, & buckets[new_hash], entry)
255  如果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, next)
257  否则rht_assign_locked(bkt, next)
261  out :
262  返回:err
调用者
名称描述
rhashtable_rehash_chain