Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:lib\lru_cache.c Create Date:2022-07-28 07:16:54
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:lc_set - associate index with label*@lc: the lru cache to operate on*@enr: the label to set*@index: the element index to associate label with.* Used to initialize the active set to some previously recorded state.

Proto:void lc_set(struct lru_cache *lc, unsigned int enr, int index)

Type:void

Parameter:

TypeParameterName
struct lru_cache *lc
unsigned intenr
intindex
611  If index < 0 || index >= number of elements (indices) Then Return
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  If enr == special label when on free list Then lh = free
622  Else
623  hlist_add_head( & colision, lc_hash_slot(lc, enr))
624  lh = the least recently used item is kept at lru->prev
626  list_move - delete from one list and add as another's head*@list: the entry to move*@head: the head that will precede our entry