Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:look_up_lock_class

Proto:static inline struct lock_class *look_up_lock_class(const struct lockdep_map *lock, unsigned int subclass)

Type:struct lock_class

Parameter:

TypeParameterName
const struct lockdep_map *lock
unsigned intsubclass
797  If Value for the false possibility is greater at compile time(subclass >= MAX_LOCKDEP_SUBCLASSES) Then
798  Generic 'turn off all lock debugging' function:
799  printk(r conditions "BUG: looking up invalid subclass: %u\n", subclass)
801  printk(r conditions "turning off the locking correctness validator.\n")
803  dump_stack()
804  Return NULL
811  If Value for the false possibility is greater at compile time(!key) Then Return NULL
820  BUILD_BUG_ON - break compile if a condition is true(sizeof(structlock_class_key) > sizeof(structlockdep_map))
823  key = subkeys + subclass
825  hash_head = classhashentry(key)
830  If DEBUG_LOCKS_WARN_ON(!Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.()) Then Return NULL
834  If key == key Then
839  WARN_ON_ONCE(name != name && key != & __lockdep_no_validate__)
841  Return class
845  Return NULL
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.
match_held_lock
__lockdep_reset_lockThe caller must hold the graph lock. Does not sleep.