函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:look_up_lock_class

函数原型:static inline struct lock_class *look_up_lock_class(const struct lockdep_map *lock, unsigned int subclass)

返回类型:struct lock_class

参数:

类型参数名称
const struct lockdep_map *lock
unsigned intsubclass
797  如果此条件成立可能性小(为编译器优化)(subclass >= MAX_LOCKDEP_SUBCLASSES)则
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  返回:NULL
811  如果此条件成立可能性小(为编译器优化)(!key)则返回:NULL
820  BUILD_BUG_ON - break compile if a condition is true(sizeof(structlock_class_key) > sizeof(structlockdep_map))
823  key等于subkeyssubclass
825  hash_head等于classhashentry(key)
830  如果DEBUG_LOCKS_WARN_ON(!已禁止中断())则返回:NULL
834  如果key恒等于key
839  WARN_ON_ONCE(name != name && key != & __lockdep_no_validate__)
841  返回:class
845  返回:NULL
调用者
名称描述
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.