Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:To make lock name printouts unique, we calculate a unique* class->name_version generation counter. The caller must hold the graph* lock.

Proto:static int count_matching_names(struct lock_class *new_class)

Type:int

Parameter:

TypeParameterName
struct lock_class *new_class
775  count = 0
777  If Not name Then Return 0
781  If key - subclass == key Then Return name_version
783  If name && Not strcmp(name, name) Then count = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(count, name_version)
787  Return count + 1
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.