函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:设置关联索引

函数原型:void lc_set(struct lru_cache *lc, unsigned int enr, int index)

返回类型:void

参数:

类型参数名称
struct lru_cache *lc
unsigned intenr
intindex
611  如果index小于0或index大于等于 number of elements (indices) 则返回
614  e等于lc_element_by_index*@lc: the lru cache to operate on*@i: the index of the element to return
615  BUG_ON( we want to track a larger set of objects,* it needs to become arch independend u64 != r pending changes )
616  BUG_ON(refcnt != 0)
618  we want to track a larger set of objects,* it needs to become arch independend u64 等于r pending changes 等于enr
619  hlist_del_init( & colision)
620  如果enr恒等于special label when on free list lh等于free
622  否则
623  hlist_add_head( & colision, lc_hash_slot(lc, enr))
624  lh等于 the least recently used item is kept at lru->prev
626  链表项移动到头部