Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:lc_prepare_for_change

Proto:static struct lc_element *lc_prepare_for_change(struct lru_cache *lc, unsigned new_number)

Type:struct lc_element

Parameter:

TypeParameterName
struct lru_cache *lc
unsignednew_number
326  If Not list_empty - tests whether a list is empty*@head: the list to test. Then n = next
328  Else if Not list_empty - tests whether a list is empty*@head: the list to test. Then n = prev
330  Else Return NULL
333  e = list_entry - get the struct for this entry*@ptr: the &struct list_head pointer.*@type: the type of the struct this is embedded in.*@member: the name of the list_head within the struct.(n, structlc_element, list)
334  BUG() if e is not one of the elements tracked by lc (lc, e)
336  r pending changes = new_number
337  If Not hlist_unhashed( & colision) Then __hlist_del( & colision)
339  hlist_add_head( & colision, lc_hash_slot(lc, new_number))
340  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
342  Return e
Caller
NameDescribe
__lc_get