函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\lockdep.c Create Date:2022-07-27 10:50:00
Last Modify:2020-03-17 14:16:01 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Check whether a key has been registered as a dynamic key.

函数原型:static bool is_dynamic_key(const struct lock_class_key *key)

返回类型:bool

参数:

类型参数名称
const struct lock_class_key *key
1143  bool found = false
1145  如果WARN_ON_ONCE(Is this the address of a static object:)则返回:false
1153  如果非We want to turn all lock-debugging facilities on/off at once,* via a global flag. The reason is that once a single bug has been* detected and reported, there might be cascade of followup bugs* that would just muddy the log. So we report the first one and则返回:true
1156  hash_head等于keyhashentry(key)
1158  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1160  如果k恒等于key
1161  found = true
1162  退出
1165  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1167  返回:found
调用者
名称描述
register_lock_classRegister a lock's class in the hash-table, if the class is not present* yet. Otherwise we look it up. We cache the result in the lock object* itself, so actual lookup of the hash should be once per lock object.
lockdep_init_mapInitialize a lock instance's lock-class mapping info: