函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:Remove all references to a lock class. The caller must hold the graph lock.

函数原型:static void zap_class(struct pending_free *pf, struct lock_class *class)

返回类型:void

参数:

类型参数名称
struct pending_free *pf
struct lock_class *class
4849  WARN_ON_ONCE(!key)
4856  entry等于list_entriesi
4857  如果class不等于classlinks_to不等于class则继续下一循环
4859  __clear_bit - Clears a bit in memory*@nr: the bit to clear*@addr: the address to start counting from* Unlike clear_bit(), this function is non-atomic. If it is called on the same* region of memory concurrently, the effect may be that only one operation
4860  nr_list_entries自减
4861  删除不需要重新初始化的列表项
4863  如果链表为空链表为空
4865  链表项移动到尾部
4866  删除哈希表中无需重新初始化的条目
4867  WRITE_ONCE(key, NULL)
4868  WRITE_ONCE(name, NULL)
4869  nr_lock_classes自减
4870  __clear_bit - Clears a bit in memory*@nr: the bit to clear*@addr: the address to start counting from* Unlike clear_bit(), this function is non-atomic. If it is called on the same* region of memory concurrently, the effect may be that only one operation
4871  否则
4872  WARN_ONCE(true, "%s() failed for class %s\n", __func__, name)
4876  Must be called with the graph lock held.
调用者
名称描述
__lockdep_free_key_rangeRemove all lock classes from the class hash table and from the* all_lock_classes list whose key or name is in the address range [start,* start + size). Move these lock classes to the zapped_classes list. Must* be called with the graph lock held.
__lockdep_reset_lockThe caller must hold the graph lock. Does not sleep.