Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\locking\lockdep.c Create Date:2022-07-28 09:49:41
Last Modify:2020-03-17 14:16:01 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:Check whether a key has been registered as a dynamic key.

Proto:static bool is_dynamic_key(const struct lock_class_key *key)

Type:bool

Parameter:

TypeParameterName
const struct lock_class_key *key
1143  bool found = false
1145  If WARN_ON_ONCE(Is this the address of a static object:) Then Return false
1153  If Not 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 Then Return 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  If k == key Then
1161  found = true
1162  Break
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  Return found
Caller
NameDescribe
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: