函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\lru_cache.c Create Date:2022-07-27 08:15:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:重置锁和哈希表

函数原型:void lc_reset(struct lru_cache *lc)

返回类型:void

参数:

类型参数名称
struct lru_cache *lc
197  初始化链表头
198  初始化链表头
199  初始化链表头
200  初始化链表头
201  number of elements currently on in_use list 等于0
202  hits等于0
203  misses等于0
204  starving等于0
205  locked等于0
206  changed等于0
207  number of elements currently on to_be_changed list 等于0
208  see below: flag-bits for lru_cache 等于0
209  memset( nr_elements there , 0, sizeof(structhlist_head) * number of elements (indices) )
211 i小于 number of elements (indices) 循环
212  e等于lc_element[i]
213  p等于e
214  p减等于 offset of struct lc_element member in the tracked object
215  memset(p, 0, size of tracked objects, used to memset(,0,) them in lc_reset )
217  ack "pointer" into lc_cache->element[index],* for paranoia, and for "lc_element_to_index" 等于i
218  we want to track a larger set of objects,* it needs to become arch independend u64 等于special label when on free list
219  r pending changes 等于special label when on free list
220  添加链表项