linux/lib/lru_cache.c
<<
v4.00" /spa3.1 0" /form.1 0" a v4.00" href="../linux+v3.7.1/lib/lru_cache.c">v4.00" img src="../.static/gfx/right.png" alt=">>">v4 /spa3.1v4 spa3 class="lxr_search">v4.0v4.00" input typ4.2hidden" nam4.2navtarget" v3.14.2">v4.00" input typ4.2text" nam4.2search" id.2search">v4.00" butt typ4.2submit">Searchv4.00"Prefs1 0" /a>v4 /spa3.1.00" " /div.1.00" " form ac="v3="ajax+*" method="post" onsubmit="return false;">v4 input typ4.2hidden" nam4.2ajax_lookup" id.2ajax_lookup" v3.14.2">v.00" " /form.1v.00" " div class="headingbott m">1 div id.2file_contents".
" "1
/a>
spa3 class="comment">/*
/spa3.1" "2
/a>
spa3 class="comment">" "lru_cache.c
/spa3.1" "3
/a>v" "4
/a>
spa3 class="comment">" "This file is part of DRBD by Philipp Reisner and Lars Ellenberg.
/spa3.1" "5
/a>v" "6
/a>
spa3 class="comment">" "Copyright (C) 2003-2008, LINBIT Informa >
  Technologies GmbH.
/spa3.1" "7
/a>
spa3 class="comment">" "Copyright (C) 2003-2008, Philipp Reisner <philipp.reisner@linbit.com>.
/spa3.1" "8
/a>
spa3 class="comment">" "Copyright (C) 2003-2008, Lars Ellenberg <lars.ellenberg@linbit.com>.
/spa3.1" "9
/a>v"  vala>
spa3 class="comment">" "drbd is free software; you ca3 redistribute it and/or modify
/spa3.1" 11
/a>
spa3 class="comment">" "it under the terms of the GNU General Public License as published by
/spa3.1" 12
/a>
spa3 class="comment">" "the Free Software Founda >
 ; either vers>
  2, or (at your ue="v3)
/spa3.1" 13
/a>
spa3 class="comment">" "any later vers>
 .
/spa3.1" 14
/a>v" 15ala>
spa3 class="comment">" "drbd is distributed in"the hope that it will be useful,
/spa3.1" 16
/a>
spa3 class="comment">" "but WITHOUT ANY WARRANTY; without even"the implied warranty of
/spa3.1" 17
/a>
spa3 class="comment">" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
/spa3.1" 18
/a>
spa3 class="comment">" "GNU General Public License for more details.
/spa3.1" 19
/a>v" 2vala>
spa3 class="comment">" "You should have received a copy of the GNU General Public License
/spa3.1" 21
/a>
spa3 class="comment">" "along with"drbd; see the file COPYING.  If not, write to
/spa3.1" 22
/a>
spa3 class="comment">" "the Free Software Founda >
 , 675 Mass Ave, Cambridge, MA 02139, USA.
/spa3.1" 23
/a>v" 24
/a>
spa3 class="comment">"*/
/spa3.1" 25
/a>v" 26
/a>#include <linux/module.h
/a>>v" 27
/a>#include <linux/bitops.h
/a>>v" 28
/a>#include <linux/slab.h
/a>>v" 29
/a>#include <linux/string.h
/a>> 
spa3 class="comment">/* for memset"*/
/spa3.1" 30
/a>#include <linux/seq_file.h
/a>> 
spa3 class="comment">/* for seq_printf"*/
/spa3.1" 31
/a>#include <linux/lru_cache.h
/a>>v" 32
/a>v" 33
/a>
a href="+code=MODULE_AUTHOR" class="sref">MODULE_AUTHOR
/a>(
spa3 class="string">"Philipp Reisner <phil@linbit.com>, "
/spa3.1" 34
/a>              
spa3 class="string">"Lars Ellenberg <lars@linbit.com>"
/spa3.);v" 35
/a>
a href="+code=MODULE_DESCRIPTION" class="sref">MODULE_DESCRIPTION
/a>(
spa3 class="string">"lru_cache - Track sets of hot objects"
/spa3.);v" 36
/a>
a href="+code=MODULE_LICENSE" class="sref">MODULE_LICENSE
/a>(
spa3 class="string">"GPL"
/spa3.);v" 37
/a>v" 38
/a>
spa3 class="comment">/* this is developers aid only.
/spa3.1" 39
/a>
spa3 class="comment">"* it catches concurrent access (lack of locking on"the users part)"*/
/spa3.1" 40
/a>#define 
a href="+code=PARANOIA_ENTRY" class="sref">PARANOIA_ENTRY
/a>() do {           \1" 41
/a>        
a href="+code=BUG_ON" class="sref">BUG_ON
/a>(!
a href="+code=lc" class="sref">lc
/a>);                    \1" 42
/a>        
a href="+code=BUG_ON" class="sref">BUG_ON
/a>(!
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a>);       \1" 43
/a>        
a href="+code=BUG_ON" class="sref">BUG_ON
/a>(
a href="+code=test_and_set_bit" class="sref">test_and_set_bit
/a>(
a href="+code=__LC_PARANOIA" class="sref">__LC_PARANOIA
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=flags" class="sref">flags
/a>)); \1" 44
/a>} while (0)1" 45
/a>v" 46
/a>#define 
a href="+code=RETURN" class="sref">RETURN
/a>(
a href="+code=x" class="sref">x
/a>...)     do { \1" 47
/a>        
a href="+code=clear_bit" class="sref">clear_bit
/a>(
a href="+code=__LC_PARANOIA" class="sref">__LC_PARANOIA
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=flags" class="sref">flags
/a>); \1" 48
/a>        
a href="+code=smp_mb__after_clear_bit" class="sref">smp_mb__after_clear_bit
/a>(); return 
a href="+code=x" class="sref">x
/a> ; } while (0)1" 49
/a>v" 5vala>
spa3 class="comment">/* BUG() if e is not one of the elements tracked by lc"*/
/spa3.1" 51
/a>#define 
a href="+code=PARANOIA_LC_ELEMENT" class="sref">PARANOIA_LC_ELEMENT
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=e" class="sref">e
/a>) do { \1" 52
/a>        struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc_" class="sref">lc_
/a> = (
a href="+code=lc" class="sref">lc
/a>);   \1" 53
/a>        struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=e_" class="sref">e_
/a> = (
a href="+code=e" class="sref">e
/a>);    \1" 54
/a>        unsigned 
a href="+code=i" class="sref">i
/a> = 
a href="+code=e_" class="sref">e_
/a>->
a href="+code=lc_index" class="sref">lc_index
/a>;      \1" 55
/a>        
a href="+code=BUG_ON" class="sref">BUG_ON
/a>(
a href="+code=i" class="sref">i
/a> >= 
a href="+code=lc_" class="sref">lc_
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a>);  \1" 56
/a>        
a href="+code=BUG_ON" class="sref">BUG_ON
/a>(
a href="+code=lc_" class="sref">lc_
/a>->
a href="+code=lc_element" class="sref">lc_element
/a>[
a href="+code=i" class="sref">i
/a>] != 
a href="+code=e_" class="sref">e_
/a>); } while (0)1" 57
/a>v" 58
/a>
spa3 class="comment">/**
/spa3.1" 59
/a>
spa3 class="comment">"* lc_create - prepares to track objects in"a3 ac="ve set
/spa3.1" 6vala>
spa3 class="comment">"* @nam4: descrip="ve nam4 only used in"lc_seq_printf_stats and lc_seq_dump_details
/spa3.1" 61
/a>
spa3 class="comment">"* @e_count: number of elements allowed to be ac="ve simultaneously
/spa3.1" 62
/a>
spa3 class="comment">"* @e_siz4: siz4 of the tracked objects
/spa3.1" 63
/a>
spa3 class="comment">"* @e_off: offset"to the &struct lc_element member in"a tracked object
/spa3.1" 64
/a>
spa3 class="comment">"*
/spa3.1" 65ala>
spa3 class="comment">"* Returns a pointer to a newly initializ4d struct lru_cache on success,
/spa3.1" 66
/a>
spa3 class="comment">"* or NULL on (alloca >
 ) failure.
/spa3.1" 67
/a>
spa3 class="comment">"*/
/spa3.1" 68
/a>struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc_create" class="sref">lc_create
/a>(const char *
a href="+code=nam4" class="sref">nam4
/a>, struct 
a href="+code=kmem_cache" class="sref">kmem_cache
/a> *
a href="+code=cache" class="sref">cache
/a>,1" 69
/a>                unsigned 
a href="+code=e_count" class="sref">e_count
/a>, 
a href="+code=siz4_t" class="sref">siz4_t
/a> 
a href="+code=e_siz4" class="sref">e_siz4
/a>, 
a href="+code=siz4_t" class="sref">siz4_t
/a> 
a href="+code=e_off" class="sref">e_off
/a>)1" 7vala>{1" 71
/a>        struct 
a href="+code=hlist_head" class="sref">hlist_head
/a> *
a href="+code=slot" class="sref">slot
/a> = 
a href="+code=NULL" class="sref">NULL
/a>;1" 72
/a>        struct 
a href="+code=lc_element" class="sref">lc_element
/a> **
a href="+code=element" class="sref">element
/a> = 
a href="+code=NULL" class="sref">NULL
/a>;1" 73
/a>        struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>;1" 74
/a>        struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=e" class="sref">e
/a>;1" 75
/a>        unsigned 
a href="+code=cache_obj_siz4" class="sref">cache_obj_siz4
/a> = 
a href="+code=kmem_cache_siz4" class="sref">kmem_cache_siz4
/a>(
a href="+code=cache" class="sref">cache
/a>);v" 76
/a>        unsigned 
a href="+code=i" class="sref">i
/a>;v" 77
/a>v" 78
/a>        
a href="+code=WARN_ON" class="sref">WARN_ON
/a>(
a href="+code=cache_obj_siz4" class="sref">cache_obj_siz4
/a> < 
a href="+code=e_siz4" class="sref">e_siz4
/a>);v" 79
/a>        if (
a href="+code=cache_obj_siz4" class="sref">cache_obj_siz4
/a> < 
a href="+code=e_siz4" class="sref">e_siz4
/a>)1" 80
/a>                return 
a href="+code=NULL" class="sref">NULL
/a>;1" 81
/a>v" 82
/a>        
spa3 class="comment">/* e_count too big; would probably fail the alloca >
  below"anyways.
/spa3.1" 83
/a>
spa3 class="comment">" """""""* for typical use cases, e_count should be few thousand at most."*/
/spa3.1" 84
/a>        if (
a href="+code=e_count" class="sref">e_count
/a> > 
a href="+code=LC_MAX_ACTIVE" class="sref">LC_MAX_ACTIVE
/a>)1" 85
/a>                return 
a href="+code=NULL" class="sref">NULL
/a>;1" 86
/a>v" 87
/a>        
a href="+code=slot" class="sref">slot
/a> = 
a href="+code=kcalloc" class="sref">kcalloc
/a>(
a href="+code=e_count" class="sref">e_count
/a>, siz4of(struct 
a href="+code=hlist_head" class="sref">hlist_head
/a>), 
a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL
/a>);v" 88
/a>        if (!
a href="+code=slot" class="sref">slot
/a>)1" 89
/a>                goto 
a href="+code=out_fail" class="sref">out_fail
/a>;1" 90
/a>        
a href="+code=element" class="sref">element
/a> = 
a href="+code=kzalloc" class="sref">kzalloc
/a>(
a href="+code=e_count" class="sref">e_count
/a>"* siz4of(struct 
a href="+code=lc_element" class="sref">lc_element
/a> *), 
a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL
/a>);v" 91
/a>        if (!
a href="+code=element" class="sref">element
/a>)1" 92
/a>                goto 
a href="+code=out_fail" class="sref">out_fail
/a>;1" 93
/a>v" 94
/a>        
a href="+code=lc" class="sref">lc
/a> = 
a href="+code=kzalloc" class="sref">kzalloc
/a>(siz4of(*
a href="+code=lc" class="sref">lc
/a>), 
a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL
/a>);v" 95
/a>        if (!
a href="+code=lc" class="sref">lc
/a>)v" 96
/a>                goto 
a href="+code=out_fail" class="sref">out_fail
/a>;1" 97
/a>v" 98
/a>        
a href="+code=INIT_LIST_HEAD" class="sref">INIT_LIST_HEAD
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=in_use" class="sref">in_use
/a>);v" 99
/a>        
a href="+code=INIT_LIST_HEAD" class="sref">INIT_LIST_HEAD
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lru" class="sref">lru
/a>);v"100
/a>        
a href="+code=INIT_LIST_HEAD" class="sref">INIT_LIST_HEAD
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v"101
/a>v"102
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nam4" class="sref">nam4
/a> = 
a href="+code=nam4" class="sref">nam4
/a>;v"103
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=element_siz4" class="sref">element_siz4
/a> = 
a href="+code=e_siz4" class="sref">e_siz4
/a>;v"104
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=element_off" class="sref">element_off
/a> = 
a href="+code=e_off" class="sref">e_off
/a>;v"105
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a> = 
a href="+code=e_count" class="sref">e_count
/a>;v"106
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=new_number" class="sref">new_number
/a> = 
a href="+code=LC_FREE" class="sref">LC_FREE
/a>;v"107
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_cache" class="sref">lc_cache
/a> = 
a href="+code=cache" class="sref">cache
/a>;v"108
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_element" class="sref">lc_element
/a> = 
a href="+code=element" class="sref">element
/a>;v"109
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_slot" class="sref">lc_slot
/a> = 
a href="+code=slot" class="sref">slot
/a>;v"1 vala>v"111
/a>        
spa3 class="comment">/* prealloca e all objects */
/spa3.1"112
/a>        for (
a href="+code=i" class="sref">i
/a> = 0; 
a href="+code=i" class="sref">i
/a> < 
a href="+code=e_count" class="sref">e_count
/a>; 
a href="+code=i" class="sref">i
/a>++) {1"113
/a>                void *
a href="+code=p" class="sref">p
/a> = 
a href="+code=kmem_cache_alloc" class="sref">kmem_cache_alloc
/a>(
a href="+code=cache" class="sref">cache
/a>, 
a href="+code=GFP_KERNEL" class="sref">GFP_KERNEL
/a>);v"114
/a>                if (!
a href="+code=p" class="sref">p
/a>)v"115
/a>                        break;v"116
/a>                
a href="+code=memset" class="sref">memset
/a>(
a href="+code=p" class="sref">p
/a>, 0, 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=element_siz4" class="sref">element_siz4
/a>);v"117
/a>                
a href="+code=e" class="sref">e
/a> = 
a href="+code=p" class="sref">p
/a> + 
a href="+code=e_off" class="sref">e_off
/a>;v"118
/a>                
a href="+code=e" class="sref">e
/a>->
a href="+code=lc_index" class="sref">lc_index
/a> = 
a href="+code=i" class="sref">i
/a>;v"119
/a>                
a href="+code=e" class="sref">e
/a>->
a href="+code=lc_number" class="sref">lc_number
/a> = 
a href="+code=LC_FREE" class="sref">LC_FREE
/a>;v"120
/a>                
a href="+code=list_add" class="sref">list_add
/a>(&
a href="+code=e" class="sref">e
/a>->
a href="+code=list" class="sref">list
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v"121
/a>                
a href="+code=element" class="sref">element
/a>[
a href="+code=i" class="sref">i
/a>] = 
a href="+code=e" class="sref">e
/a>;v"122
/a>        }v"123
/a>        if (
a href="+code=i" class="sref">i
/a> == 
a href="+code=e_count" class="sref">e_count
/a>)v"124
/a>                return 
a href="+code=lc" class="sref">lc
/a>;1"125
/a>v"126
/a>        
spa3 class="comment">/* else: could not alloca e all elements, g"ve up */
/spa3.1"127
/a>        for (
a href="+code=i" class="sref">i
/a>--; 
a href="+code=i" class="sref">i
/a>; 
a href="+code=i" class="sref">i
/a>--) {1"128
/a>                void *
a href="+code=p" class="sref">p
/a> = 
a href="+code=element" class="sref">element
/a>[
a href="+code=i" class="sref">i
/a>];1"129
/a>                
a href="+code=kmem_cache_free" class="sref">kmem_cache_free
/a>(
a href="+code=cache" class="sref">cache
/a>, 
a href="+code=p" class="sref">p
/a> - 
a href="+code=e_off" class="sref">e_off
/a>);1"130
/a>        }v"131
/a>        
a href="+code=kfree" class="sref">kfree
/a>(
a href="+code=lc" class="sref">lc
/a>);v"132
/a>
a href="+code=out_fail" class="sref">out_fail
/a>:v"133
/a>        
a href="+code=kfree" class="sref">kfree
/a>(
a href="+code=element" class="sref">element
/a>);v"134
/a>        
a href="+code=kfree" class="sref">kfree
/a>(
a href="+code=slot" class="sref">slot
/a>);v"135
/a>        return 
a href="+code=NULL" class="sref">NULL
/a>;1"136
/a>}v"137
/a>v"138
/a>void 
a href="+code=lc_free_by_index" class="sref">lc_free_by_index
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>, unsigned 
a href="+code=i" class="sref">i
/a>)v"139
/a>{1"140
/a>        void *
a href="+code=p" class="sref">p
/a> = 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_element" class="sref">lc_element
/a>[
a href="+code=i" class="sref">i
/a>];1"141
/a>        
a href="+code=WARN_ON" class="sref">WARN_ON
/a>(!
a href="+code=p" class="sref">p
/a>);1"142
/a>        if (
a href="+code=p" class="sref">p
/a>) {1"143
/a>                
a href="+code=p" class="sref">p
/a> -= 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=element_off" class="sref">element_off
/a>;1"144
/a>                
a href="+code=kmem_cache_free" class="sref">kmem_cache_free
/a>(
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_cache" class="sref">lc_cache
/a>, 
a href="+code=p" class="sref">p
/a>);1"145
/a>        }v"146
/a>}v"147
/a>v"148
/a>
spa3 class="comment">/**
/spa3.1"149
/a>
spa3 class="comment">"* lc_destroy - frees memory alloca ed by lc_create()
/spa3.1"15vala>
spa3 class="comment">"* @lc: the lru cache to destroy
/spa3.1"151
/a>
spa3 class="comment">"*/
/spa3.1"152
/a>void 
a href="+code=lc_destroy" class="sref">lc_destroy
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>)v"153
/a>{1"154
/a>        unsigned 
a href="+code=i" class="sref">i
/a>;1"155
/a>        if (!
a href="+code=lc" class="sref">lc
/a>)v"156
/a>                return;1"157
/a>        for (
a href="+code=i" class="sref">i
/a> = 0; 
a href="+code=i" class="sref">i
/a> < 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a>; 
a href="+code=i" class="sref">i
/a>++)1"158
/a>                
a href="+code=lc_free_by_index" class="sref">lc_free_by_index
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=i" class="sref">i
/a>);1"159
/a>        
a href="+code=kfree" class="sref">kfree
/a>(
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_element" class="sref">lc_element
/a>);1"160
/a>        
a href="+code=kfree" class="sref">kfree
/a>(
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_slot" class="sref">lc_slot
/a>);1"161
/a>        
a href="+code=kfree" class="sref">kfree
/a>(
a href="+code=lc" class="sref">lc
/a>);v"162
/a>}v"163
/a>v"164
/a>
spa3 class="comment">/**
/spa3.1"165ala>
spa3 class="comment">"* lc_reset"- does a full reset"for @lc and the hash table slots.
/spa3.1"166
/a>
spa3 class="comment">"* @lc: the lru cache to opera e on
/spa3.1"167
/a>
spa3 class="comment">"*
/spa3.1"168
/a>
spa3 class="comment">"* It is roughly the equivalent of re-alloca >ng a fresh lru_cache object,
/spa3.1"169
/a>
spa3 class="comment">"* basically a short cut"to lc_destroy(lc); lc"= lc_create(...);
/spa3.1"17vala>
spa3 class="comment">"*/
/spa3.1"171
/a>void 
a href="+code=lc_reset" class="sref">lc_reset
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>)v"172
/a>{1"173
/a>        unsigned 
a href="+code=i" class="sref">i
/a>;1"174
/a>v"175
/a>        
a href="+code=INIT_LIST_HEAD" class="sref">INIT_LIST_HEAD
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=in_use" class="sref">in_use
/a>);v"176
/a>        
a href="+code=INIT_LIST_HEAD" class="sref">INIT_LIST_HEAD
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lru" class="sref">lru
/a>);v"177
/a>        
a href="+code=INIT_LIST_HEAD" class="sref">INIT_LIST_HEAD
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v"178
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=used" class="sref">used
/a> = 0;v"179
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=hits" class="sref">hits
/a> = 0;v"180
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=misses" class="sref">misses
/a> = 0;v"181
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=starving" class="sref">starving
/a> = 0;v"182
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=dirty" class="sref">dirty
/a> = 0;v"183
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=changed" class="sref">changed
/a> = 0;v"184
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=flags" class="sref">flags
/a> = 0;v"185
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=changing_element" class="sref">changing_element
/a> = 
a href="+code=NULL" class="sref">NULL
/a>;1"186
/a>        
a href="+code=lc" class="sref">lc
/a>->
a href="+code=new_number" class="sref">new_number
/a> = 
a href="+code=LC_FREE" class="sref">LC_FREE
/a>;v"187
/a>        
a href="+code=memset" class="sref">memset
/a>(
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_slot" class="sref">lc_slot
/a>, 0, siz4of(struct 
a href="+code=hlist_head" class="sref">hlist_head
/a>)"* 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a>);v"188
/a>v"189
/a>        for (
a href="+code=i" class="sref">i
/a> = 0; 
a href="+code=i" class="sref">i
/a> < 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a>; 
a href="+code=i" class="sref">i
/a>++) {1"190
/a>                struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=e" class="sref">e
/a> = 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_element" class="sref">lc_element
/a>[
a href="+code=i" class="sref">i
/a>];1"191
/a>                void *
a href="+code=p" class="sref">p
/a> = 
a href="+code=e" class="sref">e
/a>;1"192
/a>                
a href="+code=p" class="sref">p
/a> -= 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=element_off" class="sref">element_off
/a>;1"193
/a>                
a href="+code=memset" class="sref">memset
/a>(
a href="+code=p" class="sref">p
/a>, 0, 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=element_siz4" class="sref">element_siz4
/a>);v"194
/a>                
spa3 class="comment">/* re-init it */
/spa3.1"195
/a>                
a href="+code=e" class="sref">e
/a>->
a href="+code=lc_index" class="sref">lc_index
/a> = 
a href="+code=i" class="sref">i
/a>;v"196
/a>                
a href="+code=e" class="sref">e
/a>->
a href="+code=lc_number" class="sref">lc_number
/a> = 
a href="+code=LC_FREE" class="sref">LC_FREE
/a>;v"197
/a>                
a href="+code=list_add" class="sref">list_add
/a>(&
a href="+code=e" class="sref">e
/a>->
a href="+code=list" class="sref">list
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v"198
/a>        }v"199
/a>}v"20vala>v"201
/a>
spa3 class="comment">/**
/spa3.1"202
/a>
spa3 class="comment">"* lc_seq_printf_stats - print stats about @lc into @seq
/spa3.1"203
/a>
spa3 class="comment">"* @seq: the seq_file"to print into
/spa3.1"204
/a>
spa3 class="comment">"* @lc: the lru cache to print statistics of
/spa3.1"205ala>
spa3 class="comment">"*/
/spa3.1"206
/a>
a href="+code=siz4_t" class="sref">siz4_t
/a> 
a href="+code=lc_seq_printf_stats" class="sref">lc_seq_printf_stats
/a>(struct 
a href="+code=seq_file" class="sref">seq_file
/a> *
a href="+code=seq" class="sref">seq
/a>, struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>)v"207
/a>{1"208
/a>        
spa3 class="comment">/* NOTE:
/spa3.1"209
/a>
spa3 class="comment">"""""""""* total calls"to lc_get are
/spa3.1"21vala>
spa3 class="comment">"""""""""* (starving + hits + misses)
/spa3.1"211
/a>
spa3 class="comment">"""""""""* misses include "dirty" count (upda e from"a3 other thread in
/spa3.1"212
/a>
spa3 class="comment">"""""""""* progress) and "changed", when this in fact lead to an successful
/spa3.1"213
/a>
spa3 class="comment">" """""""* upda e of the cache.
/spa3.1"214
/a>
spa3 class="comment">" """""""*/
/spa3.1"215
/a>        return 
a href="+code=seq_printf" class="sref">seq_printf
/a>(
a href="+code=seq" class="sref">seq
/a>, 
spa3 class="string">"\t%s: used:%u/%u "
/spa3.1"216
/a>                
spa3 class="string">"hits:%lu misses:%lu starving:%lu dirty:%lu changed:%lu\n"
/spa3.,1"217
/a>                
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nam4" class="sref">nam4
/a>, 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=used" class="sref">used
/a>, 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a>,1"218
/a>                
a href="+code=lc" class="sref">lc
/a>->
a href="+code=hits" class="sref">hits
/a>, 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=misses" class="sref">misses
/a>, 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=starving" class="sref">starving
/a>, 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=dirty" class="sref">dirty
/a>, 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=changed" class="sref">changed
/a>);v"219
/a>}v"22vala>v"221
/a>static struct 
a href="+code=hlist_head" class="sref">hlist_head
/a> *
a href="+code=lc_hash_slot" class="sref">lc_hash_slot
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>, unsigned int 
a href="+code=enr" class="sref">enr
/a>)v"222
/a>{1"223
/a>        return  
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lc_slot" class="sref">lc_slot
/a> + (
a href="+code=enr" class="sref">enr
/a> % 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a>);v"224
/a>}v"225
/a>v"226
/a>v"227
/a>
spa3 class="comment">/**
/spa3.1"228
/a>
spa3 class="comment">"* lc_find - find element by label, if present in the hash table
/spa3.1"229
/a>
spa3 class="comment">"* @lc: The lru_cache object
/spa3.1"23vala>
spa3 class="comment">"* @enr: element number
/spa3.1"231
/a>
spa3 class="comment">"*
/spa3.1"232
/a>
spa3 class="comment">"* Returns the pointer to an element, if the element with the requested
/spa3.1"233
/a>
spa3 class="comment">"* "label" or element number is present in the hash table,
/spa3.1"234
/a>
spa3 class="comment">"* or NULL if not found. Does not change the refcnt.
/spa3.1"235ala>
spa3 class="comment">"*/
/spa3.1"236
/a>struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=lc_find" class="sref">lc_find
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>, unsigned int 
a href="+code=enr" class="sref">enr
/a>)v"237
/a>{1"238
/a>        struct 
a href="+code=hlist_node" class="sref">hlist_node
/a> *
a href="+code=n" class="sref">n
/a>;v"239
/a>        struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=e" class="sref">e
/a>;1"24vala>v"241
/a>        
a href="+code=BUG_ON" class="sref">BUG_ON
/a>(!
a href="+code=lc" class="sref">lc
/a>);1"242
/a>        
a href="+code=BUG_ON" class="sref">BUG_ON
/a>(!
a href="+code=lc" class="sref">lc
/a>->
a href="+code=nr_elements" class="sref">nr_elements
/a>);v"243
/a>        
a href="+code=hlist_for_each_entry" class="sref">hlist_for_each_entry
/a>(
a href="+code=e" class="sref">e
/a>, 
a href="+code=n" class="sref">n
/a>, 
a href="+code=lc_hash_slot" class="sref">lc_hash_slot
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=enr" class="sref">enr
/a>), 
a href="+code=colision" class="sref">colision
/a>) {1"244
/a>                if (
a href="+code=e" class="sref">e
/a>->
a href="+code=lc_number" class="sref">lc_number
/a> == 
a href="+code=enr" class="sref">enr
/a>)v"245
/a>                        return 
a href="+code=e" class="sref">e
/a>;1"246
/a>        }v"247
/a>        return 
a href="+code=NULL" class="sref">NULL
/a>;1"248
/a>}v"249
/a>v"25vala>
spa3 class="comment">/* returned element will be "recycled" immediately"*/
/spa3.1"251
/a>static struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=lc_evict" class="sref">lc_evict
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>)v"252
/a>{1"253
/a>        struct 
a href="+code=list_head" class="sref">list_head
/a>  *
a href="+code=n" class="sref">n
/a>;v"254
/a>        struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=e" class="sref">e
/a>;1"255
/a>v"256
/a>        if (
a href="+code=list_empty" class="sref">list_empty
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lru" class="sref">lru
/a>))v"257
/a>                return 
a href="+code=NULL" class="sref">NULL
/a>;1"258
/a>v"259
/a>        
a href="+code=n" class="sref">n
/a> = 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lru" class="sref">lru
/a>.
a href="+code=prev" class="sref">prev
/a>;1"260
/a>        
a href="+code=e" class="sref">e
/a> = 
a href="+code=list_entry" class="sref">list_entry
/a>(
a href="+code=n" class="sref">n
/a>, struct 
a href="+code=lc_element" class="sref">lc_element
/a>, 
a href="+code=list" class="sref">list
/a>);v"261
/a>v"262
/a>        
a href="+code=PARANOIA_LC_ELEMENT" class="sref">PARANOIA_LC_ELEMENT
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=e" class="sref">e
/a>);v"263
/a>v"264
/a>        
a href="+code=list_del" class="sref">list_del
/a>(&
a href="+code=e" class="sref">e
/a>->
a href="+code=list" class="sref">list
/a>);v"265
/a>        
a href="+code=hlist_del" class="sref">hlist_del
/a>(&
a href="+code=e" class="sref">e
/a>->
a href="+code=colision" class="sref">colision
/a>);v"266
/a>        return 
a href="+code=e" class="sref">e
/a>;1"267
/a>}v"268
/a>v"269
/a>
spa3 class="comment">/**
/spa3.1"27vala>
spa3 class="comment">"* lc_del - removes an element from"the cache
/spa3.1"271
/a>
spa3 class="comment">"* @lc: The lru_cache object
/spa3.1"272
/a>
spa3 class="comment">"* @e: The element to remove
/spa3.1"273
/a>
spa3 class="comment">"*
/spa3.1"274
/a>
spa3 class="comment">"* @e must be unused (refcnt == 0). Moves @e from""lru" to "free" list,
/spa3.1"275ala>
spa3 class="comment">"* sets @e->enr to %LC_FREE.
/spa3.1"276
/a>
spa3 class="comment">"*/
/spa3.1"277
/a>void 
a href="+code=lc_del" class="sref">lc_del
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>, struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=e" class="sref">e
/a>)v"278
/a>{1"279
/a>        
a href="+code=PARANOIA_ENTRY" class="sref">PARANOIA_ENTRY
/a>();v"280
/a>        
a href="+code=PARANOIA_LC_ELEMENT" class="sref">PARANOIA_LC_ELEMENT
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=e" class="sref">e
/a>);v"281
/a>        
a href="+code=BUG_ON" class="sref">BUG_ON
/a>(
a href="+code=e" class="sref">e
/a>->
a href="+code=refcnt" class="sref">refcnt
/a>);v"282
/a>v"283
/a>        
a href="+code=e" class="sref">e
/a>->
a href="+code=lc_number" class="sref">lc_number
/a> = 
a href="+code=LC_FREE" class="sref">LC_FREE
/a>;v"284
/a>        
a href="+code=hlist_del_init" class="sref">hlist_del_init
/a>(&
a href="+code=e" class="sref">e
/a>->
a href="+code=colision" class="sref">colision
/a>);v"285
/a>        
a href="+code=list_move" class="sref">list_move
/a>(&
a href="+code=e" class="sref">e
/a>->
a href="+code=list" class="sref">list
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v"286
/a>        
a href="+code=RETURN" class="sref">RETURN
/a>();v"287
/a>}v"288
/a>v"289
/a>static struct 
a href="+code=lc_element" class="sref">lc_element
/a> *
a href="+code=lc_get_unused_element" class="sref">lc_get_unused_element
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>)v"290
/a>{1"291
/a>        struct 
a href="+code=list_head" class="sref">list_head
/a> *
a href="+code=n" class="sref">n
/a>;v"292
/a>v"293
/a>        if (
a href="+code=list_empty" class="sref">list_empty
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>))v"294
/a>                return 
a href="+code=lc_evict" class="sref">lc_evict
/a>(
a href="+code=lc" class="sref">lc
/a>);v"295
/a>v"296
/a>        
a href="+code=n" class="sref">n
/a> = 
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>.
a href="+code=next" class="sref">next
/a>;v"297
/a>        
a href="+code=list_del" class="sref">list_del
/a>(
a href="+code=n" class="sref">n
/a>);v"298
/a>        return 
a href="+code=list_entry" class="sref">list_entry
/a>(
a href="+code=n" class="sref">n
/a>, struct 
a href="+code=lc_element" class="sref">lc_element
/a>, 
a href="+code=list" class="sref">list
/a>);v"299
/a>}v"30vala>v"301
/a>static int 
a href="+code=lc_unused_element_available" class="sref">lc_unused_element_available
/a>(struct 
a href="+code=lru_cache" class="sref">lru_cache
/a> *
a href="+code=lc" class="sref">lc
/a>)v"302
/a>{1"303
/a>        if (!
a href="+code=list_empty" class="sref">list_empty
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>))v"304
/a>                return 1; 
spa3 class="comment">/* something on the free list"*/
/spa3.1"305
/a>        if (!
a href="+code=list_empty" class="sref">list_empty
/a>(&
a href="+code=lc" class="sref">lc
/a>->
a href="+code=lru" class="sref">lru
/a>))v"306
/a>                return 1;  
spa3 class="comment">/* something to evict"*/
/spa3.1"307
/a>v"308
/a>        return 0;v"309
/a>}v"31vala>v"311
/a>v"312
/a>
spa3 class="comment">/**
/spa3.1"313
/a>
spa3 class="comment">"* lc_get - get element by label, maybe change the act"ve set
/spa3.1"314
/a>
spa3 class="comment">"* @lc: the lru cache to opera e on
/spa3.1"315ala>
spa3 class="comment">"* @enr: the label"to look up
/spa3.1"316
/a>
spa3 class="comment">"*
/spa3.1"317
/a>
spa3 class="comment">"* Finds an element in the cache, increases its usage count,
/spa3.1"318
/a>
spa3 class="comment">"* "touches" and returns it.
/spa3.1"319
/a>
spa3 class="comment">"*
/spa3.1"32vala>
spa3 class="comment">"* I3 case the requested number is not present, it needs"to be added to the
/spa3.1"321
/a>
spa3 class="comment">"* cache. Therefore it is possible that"a3 other element becomes evicted from
/spa3.1"322
/a>
spa3 class="comment">"* the cache. I3 either case, the user is notified so he is able"to e.g. keep
/spa3.1"323
/a>
spa3 class="comment">"* a persistent log of the cache changes, and therefore the objects in use.
/spa3.1"324
/a>
spa3 class="comment">"*
/spa3.1"325ala>
spa3 class="comment">"* Return values:
/spa3.1"326
/a>
spa3 class="comment">"*  NULL
/spa3.1"327
/a>
spa3 class="comment">"*     The cache was marked %LC_STARVING,
/spa3.1"328
/a>
spa3 class="comment">"*     or the requested label"was not in the act"ve set
/spa3.1"329
/a>
spa3 class="comment">"*     and a changing transact"on is still pending (@lc was marked %LC_DIRTY).
/spa3.1"33vala>
spa3 class="comment">"*     Or no unused or free element could be recycled (@lc will be marked as
/spa3.1"331
/a>
spa3 class="comment">"*     %LC_STARVING, blocking further lc_get() opera "ons).
/spa3.1"332
/a>
spa3 class="comment">"*
/spa3.1"333
/a>
spa3 class="comment">"*  pointer to the element with the REQUESTED element number.
/spa3.1"334
/a>
spa3 class="comment">"*     In this case, it ca3 be used right"away
/spa3.1"335ala>
spa3 class="comment">"*
/spa3.1"336
/a>
spa3 class="comment">"*  pointer to an UNUSED element with some different element number,
/spa3.1"337
/a>
spa3 class="comment">"*          where that"different number may also be %LC_FREE.
/spa3.1"338
/a>
spa3 class="comment">"*
/spa3.1"339
/a>
spa3 class="comment">"*          In this case, the cache is marked %LC_DIRTY (blocking further changes),
/spa3.1"34vala>
spa3 class="comment">"*          and the returned element pointer is removed from"the lru list"and
/spa3.1"341
/a>
spa3 class="comment">"*          hash collision chains.  The user now should do wha ever housekeeping
/spa3.1"342
/a>
spa3 class="comment">"*          is necessary.
/spa3.1"343
/a>
spa3 class="comment">"*          Then he must call lc_changed(lc,element_pointer), to finish
/spa3.1"344
/a>
spa3 class="comment">"*          the change.
/spa3.1"345ala>
spa3 class="comment">"*
/spa3.1"346
/a>
spa3 class="comment">"* NOTE: The user needs"to check"the lc_number on EACH use, so he recognizes
/spa3.1"347
/a>
spa3 class="comment">"*       any cache set"change.
/spa3.1"348
/a>
spa3 class="comment">"*/
/spa3.1"\t%s: used:%u/%u "
/spa3.1"347
/a>
spa3 class="comment">"*       g346
/ href="lib/lru_cache.c#L266" id.2L266" class="line" nam4.2L266">"266
/a>        return 
a href="+code=e" class=n07">"207
/a>{1"291
/3>static s3ruct 
a href="+code=lc_e3ement35class="sref">list_head
/a> *
a href=f="+code=e" class="sref">e
/a>;1"255
/3>{1"293
/3>        3truct 
a href="+code=lis3_head35/a>->
a href="+code=lc_nu>();v"280
/3>        3truct 
a href="+code=lc_3lemen3" class="sref"st_empty
/a>(&
as" class="sref">flags
/a> = 0;v;v"ass="line" nam4.2L244">"244
/3>v++mpty
/a>(&
as" class="sref">flags
/a> = 0;vlc
/a>->
ss="line" nam4.2L280">"280
/3>
spa3 claf (
a href="+code=list_e3pty" 35sref">e
/a>->
a href="+code=lc_nub/lru_cache.c#L287" id.2L287" clef="+code=lc_nucache.c#L258" id.2L258" claass="line" nam4.2L280">"280
/3>
spa3 cla       return 
a href="+3ode=N3LL" class="sress="line" nam4.2L310">"31vala>v"259
/3>        3a href="+code=n" class="3ref">3
/a> = 
a href="+code=lc" clac#L255" id.2L255" cla
a href="+code=free"="+code=lru_cache" class="sref">L266" id.2L266" class="line" nam4.2L266"    return 
a href="+code=e" class=n07">"ss="line" nam4.2L280">"280
/3>        3a href="+code=e" class="3ref">3
/a> = 
a hrefa href="+code=lc_number" class="sref">lc"ass="line" nam4.2L244">"244
/3>vp
/a> = 
++mpty
/a>(&
as" class="sref">flags
/a> = 0;vlc
/a>->
ss="line" nam4.2L280">"280
/3>{1p
/a> -= 
a hrea href="+code=lc_number" class="sref">lc_number
/a> == 
a hrrlru_cache.c#L282" id.2L282" cl++;free&s="line" nam4.2L280">"280
/3>        3"lib/lru_cache.c#L264" i3.2L2636ass="sref">memset
/a> 
a href="+code=lc" clad" class="sref">used
/a>, 
a href="+code=lc" class="sref">lc
/a>->
++ss="line" nam4.2L280">"280
/3>        3a href="+code=list_del" 3lass=36mment">/* something ompty
/a>(&
a hre"+code=e" class="sref">e
/a>->
a href="+code=list" class="sref">list
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v        3a href="+code=hlist_del"3class36code=e" class="sref">ef="+code=lc_nub/lru_cache.c#L287" id.2L287" clef="+code=lc_nu.c#L281" id.2L281" class="line" nam4.2L281">"281
/3>        3eturn 
a href="+code=e" 3lass=36id.2L247" class="line" nam4.2L247">"247
/3>}v"308
/a>v(&
as" class="sref">flags
/a> = 0;vlc
/a>->
ss="line" nam4.2L281">"281
/3>        3ss="comment">/**
/spa3.13a hre36 class="line" nam4.2L250">"25val3>
spa3 cl3ss="comment">"* lc_del -3remov37T" class="sreflib/lru_cache.c#L209" idt needs"to re1"329
/a>
spa3 cl3ss="comment">"* @lc: The3lru_c3che object
/spa3.1"329
/a>{1"* @e: The 3lemen3 to remove
/spa3.1
spa3 cl3ss="comment">"*
/spa3.1<3 href37lass="sref">list_empty
/a>(&
aused_element_available
/a>(struct 
a href="+code=lru_cache" class="sref">f="lib/lru_cache.c#L302" id.2L302" clas"ass="line" nam4.2L244">"244
/3>
spa3 cl3ss="comment">"* @e must 3e unu37mment">/* something ompty
/a>(&
__set_bef="+code=e" clas__set_befref">f="lib/lru_cach__b/l).
/spa3ache.c#L284" id__b/l).
/spa3/a>->
a href="+code=free" class="sref">free
/a>);v"281
/3>
spa3 cl3ss="comment">"* sets @e-3gt;en37code=e" class="sref">ef="+code=lc_nub/lru_cache.c#L287" id.2L287" clef="+code=lc_nucache.c#L258" id.2L258" claass="line" nam4.2L280">"280
/3>
spa3 cl3ss="comment">"*/
/spa3.13a hre37id.2L247" class="line" nam4.2L247">"247
/3>void 
a 3ref="+code=lc_del" class3"sref37 class="line" nam4.2L308">"308
/a>{1"329
/a>        3a href="+code=PARANOIA_E3TRY" 37lls"to lc_get are
/spa3.1"329
/a>        3a href="+code=PARANOIA_L3_ELEM38g + hits + misses)
/spa3.1"348
/a>        3a href="+code=BUG_ON" cl3ss="s38he object
/spa3.1vlist_ef="+code=lc_nute>e
/nd_set_bef="+code=e" claste>e
/nd_set_befref">f="lib/lru_cach__b/lef="lache.c#L284" id__b/lef="l/a>->
a href="+code=free" class="sref">free
/a>);v"244
/3>        3a href="+code=e" class="3ref">38ass="sref">memset
/a>++mpty
/a>(&
as" class="sref">flags
/a> = 0;vlc
/a>->
ss="line" nam4.2L280">"280
/3>        3a href="+code=hlist_del_3nit" 38mment">/* something ompty
/a>(&
b/lru_cache.c#L287" id.2L287" clef="+code=lc_nucache.c#L258" id.2L258" claass="line" nam4.2L280">"280
/3>        3a href="+code=list_move"3class3"sref">list_moss="line" nam4.2L247">"247
/3>        3a href="+code=RETURN" cl3ss="s38 class="line" nam4.2L227">"227
/3>}vlist_del
/a>(
a href="+c#L255" id.2L255" cla
a href="+code=free"=_element
/a>(struct 
a href="+code=lru_cache" class="sref">f="lib/lru_cache.c#L302" id.2L302" classs="line" nam4.2L280">"280
/3>{1list_del
/a>(
a href="+e=lc" class="sref">lc
/a>->
a href="+code=nr_.c#L281" id.2L281" class="line" nam4.2L281">"281
/3>static s3ruct 
a href="+code=lc_e3ement38 class="line" nam4.2L250">"25val3>{1PARANOIA_LC_b/lar_bef="+code=e" clasb/lar_befref">f="lib/lru_cach__b/l).
/spa3ache.c#L284" id__b/l).
/spa3/a>->
a href="+code=free" class="sref">free
/a>);v"281
/3>        3truct 
a href="+code=lis3_head39f">BUG_ON
/a>(
a href="+code=e" class="sref">e
/a>->
a hr++mpty
/a>(&
mber" class="sref">lc_number
/a> == 
a hrrlru_cache.c#L282" id.2L282" cl != 1ass="line" nam4.2L281">"281
/3>vPARANOIA_LC_d" class="sref">used
/a>, 
a href="+code=lc" class="sref">lc
/a>->
++ss="line" nam4.2L280">"280
/3>        3f (
a href="+code=list_e3pty" 39 class="line" nam4.2L264">"264
/3>        3       return 
a href="+3ode=l3_evict" class=f">PARANOIA_LC_d" class="sref">used
/a>, 
a href="+code=lc marked a>(struct 
a href="+cod marked a>(struc cla
a href="+code=frec#L255" id.2L255" class="line" nam4.2L255">"255
/3>ve
/a>-&f">PARANOIA_LC_d" class="sref">used
/a>, 
a href="+code=lcnew"+code=LC_FREE" class=new"+code= cla
a href="+code=frecef="+code=e" class=n07">ss="line" nam4.2L255">"255
/3>        3a href="+code=n" class="3ref">39 class="line" nam4.2L227">"227
/3>        3a href="+code=list_del" 3lass=3sref">list_del
/a>(
a href="+b/lru_cache.c#L287" id.2L287" clef="+code=lc_nu.c#L281" id.2L281" class="line" nam4.2L281">"281
/3>        3eturn 
a href="+code=lis3_entr39" class="line" nam4.2L249">"249
/3>}v"25val4>v"34val4>static i4t 
a href="+code=lc_unus4d_ele4="lib/lru_cache.c#L202" id.2iiebutL31ly sets a&new id."329
/4>{1"329
/4>31"329
/4>41        4f (!
a href="+code=list_4mpty"4class=uot;
/spa3.1
spa3 class="comment">"*       g346
/ href="lib/lru_cache.c#L266" id.2L266" class="line" nam4.2L266">"266
/a>        return 
a href="+code=e" class=n07">"207
/a>{1"244
/4>vlist_dellist_head
/a> *
a href=f="+code=e" class="sref">e
/a>;1"255
/4>        4eturn 0;v"259
/4>}vPARANOIA_ENTRY
/a>();v"280
/4>v = 
a hrefa href="+code=lc_nuas" class="sref">flags
/a> = 0;v;v"ass="line" nam4.2L244">"244
/4>vp
/a> = 
++mpty
/a>(&
as" class="sref">flags
/a> = 0;vlc
/a>->
ss="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">/**
/spa3.14a hre41sref">p
/a> -= 
a hrempty
/a>(&
b/lru_cache.c#L287" id.2L287" clef="+code=lc_nucache.c#L258" id.2L258" claass="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">"* lc_get -4get e41ass="sref">mess="line" nam4.2L249">"249
/4>
spa3 cl4ss="comment">"* @lc: the4lru c4che tos="line" nam4.2L249">"249
/4>        4ss="comment">"* @enr: th4 labe41sref">e
/a>-&f">PARANOIA_LC_c#L255" id.2L255" cla
a href="+code=free"="+code=lru_cache" class="sref">L266" id.2L266" class="line" nam4.2L266"    return 
a href="+code=e" class=n07">"ss="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">"*
/spa3.1<4 href41ass="sref">list_empty
/a>(&
mber" class="sref">lc"ass="line" nam4.2L244">"244
/4>
spa3 cl4ss="comment">"* Finds an4eleme4="sref">lc
/a>->
a ++mpty
/a>(&
as" class="sref">flags
/a> = 0;vlc
/a>->
ss="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">"* "to4ches&4="sref">lc
/a>->
a a href="+code=lc_number" class="sref">lc_number
/a> == 
a hrrlru_cache.c#L282" id.2L282" cl++;free&s="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">"*
/spa3.1<4 href419sref">lc
/a>->
a >e
/a>-&f">PARANOIA_LC_d" class="sref">used
/a>, 
a href="+code=lc" class="sref">lc
/a>->
++ss="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">"* I3 case 4he re420ref">p
/a> -= 
a hrempty
/a>(&
a hre"+code=e" class="sref">e
/a>->
a href="+code=list" class="sref">list
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v
spa3 cl4ss="comment">"* cache. T4erefo421ss="sref">mess="line" nam4.2L249">"249
/4>
spa3 cl4ss="comment">"* the cach4. I3 42T" class="sref">PARANOIA_LC_b/lru_cache.c#L287" id.2L287" clef="+code=lc_nu.c#L281" id.2L281" class="line" nam4.2L281">"281
/4>
spa3 cl4ss="comment">"* a persis4ent l4g of tss="line" nam4.2L249">"249
/4>
spa3 cl4ss="comment">"*
/spa3.1<4 href42he tos="line" nam4.2L249">"249
/4>
spa3 cl4ss="comment">"* Return v4lues:4/spa3.1"313
/4>
spa3 cl4ss="comment">"*  NULL
/s4a3.1<4 href="lib/lru_cache.c#L327" id3.1"233
/4>
spa3 cl4ss="comment">"*     The 4ache 4as marked %LC_STARVING,
/spf="lib/lru_cache.c#L315" id.2L315" class="line" nam4.2L315">"315al4>
spa3 cl4ss="comment">"*     or t4e req4ested label"was not in the act"lru_
/spa3.1"315al4>
spa3 cl4ss="comment">"*     and 4 chan4ing transact"on is still pendi49" class="line" nam4.2L320lam416
/4>
spa3 cl4ss="comment">"*     Or n4 unus4d or fl
/a>(struct 
a href="+
spa3 class="comment">"*       g346
/ href="lib/lru_cache.c#L266" id.2L266" class="line" nam4.2L266">lc_element
/a> *
a href="+code=e" class="sref">e
/a>)v"278
/4>
spa3 cl4ss="comment">"*     ŶLC_ST4RVING,ss="line" nam4.2L244">"244
/4>
spa3 cl4ss="comment">"*
/spa3.1<4 href43T" class="sref">PARANOIA_LC_ELEMENT
/ref="lib/lru_cache.c#L280" id.2L280" class="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">"*  pointer4to th43/a>->
a href="+code=lc_nu=e" class="sref">e
/a>->
a href="+code=refcnt" class="sref">refcn != f">PARANOIA_LC_d" class="sref">used
/a>, 
a href="+code=lc marked a>(struct 
a href="+cod marked a>(struc claass="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">"*     In t4is ca43evict" class=f">PARANOIA_LC_ELEMENT
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=e" class="sref">e
/a>);v"281
/4>
spa3 cl4ss="comment">"*
/spa3.1<4 href43sref">e
/a>-&++mpty
/a>(&
as" class="sref">flags
/a> = 0;v"281
/4>
spa3 cl4ss="comment">"*  pointer4to an43/a> = 
a href="+code=lc" cla class="sref">list
/a>, &
a href="+cod="+code=LC_FREE" class="sref">LC_FREE
/a>;vused
/a>, 
a href="+code=lcnew"+code=LC_FREE" class=new"+code= class="line" nam4.2L281">"281
/4>
spa3 cl4ss="comment">"*         4where43ref">list_del
/a>(
a href="+code=adn" class="sref">n
/a>adn->
a href="+code=list" class="sref">list
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v"281
/4>
spa3 cl4ss="comment">"*
/spa3.1<4 href438ef">list_del
/a>(
a href="+hn
/a>adnode=n" class="sref">hn
/a>adnode=n->
a href="+code=list" class="sref">list
/a>, &
a href="+coclib/lru_cache.c#L285" id.2L285" cl_hash_slot
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=enr" class="sref">enr
/a>), 
a href="+code=cold" class="sref">used
/a>, 
a href="+code=lcnew"+code=LC_FREE" class=new"+code= cla)ass="line" nam4.2L281">"281
/4>
spa3 cl4ss="comment">"*         4In th43ass="sref">PARANOIA_ENTRY
/ad" class="sref">used
/a>, 
a href="+code=lc marked a>(struct 
a href="+cod marked a>(struc cla
a href="+code=frecache.c#L258" id.2L258" class="line" nam4.2L258">"258
/4>
spa3 cl4ss="comment">"*         4and t44T" class="sref">PARANOIA_LC_d" class="sref">used
/a>, 
a href="+code=lcnew"+code=LC_FREE" class=new"+code= cla
a href="+code=freb/lru_cache.c#L284" id.2L284" class="line" nam4.2L284">"284
/4>
spa3 cl4ss="comment">"*         4hash 44f">BUG_ON
/a>(
a href="+codeb/lar_bef="+code=e" clasb/lar_befref">f="lib/lru_cach__b/lef="lache.c#L284" id__b/lef="l/a>->
a href="+code=free" class="sref">free
/a>);v"284
/4>
spa3 cl4ss="comment">"*         4is ne44T" class="sref">PARANOIA_LC_smp_mb__after_b/lar_bef="+code=e" classmp_mb__after_b/lar_bef0" class="line" nam4.2L280">"280
/4>
spa3 cl4ss="comment">"*         4Then 44/a>->
a href="+code=lc_nub/lru_cache.c#L287" id.2L287" class="line" nam4.2L287">"287
/4>
spa3 cl4ss="comment">"*         4the c4ange.
ss="line" nam4.2L249">"249
/4>
spa3 cl4ss="comment">"*
/spa3.1<4 href44 class="line" nam4.2L296">"296
/4>
spa3 cl4ss="comment">"* NOTE: Th4 user44 class="line" nam4.2L227">"227
/4>
spa3 cl4ss="comment">"*       an4 cach4 set"change.
/spa3.1"313
/4>
spa3 cl4ss="comment">"*/
/spa3.14a hre4="lib/lru_cache.c#L3/a> == 
a3d3.1pu"ve sid.2up id.uot;of"lr3" class="line" nam4.2L313">"313
/4>
spa3 cl4"\t%s: used:"u/, case, the cache is marked f="lib/lru_cache.c#L315" id.2L315" class="line" nam4.2L315">"315al4che.c#L204{1"329
/4>static s4ruct 
a href="+code=lc_e4ement45"lib/lru_cache.c#L202" id.2ii9" class="line" nam4.2L329">"329
/4>
spa3 cl4="lib/lru_cache.c#L253" 4d.2L245ats - print stats about @lc inIf id.uot;re">"3s zero,_
/spa3.1"34val4>        4truct 
a href="+code=lis4_head45 of the cache changes, and therc wasera "ons).
/spa3 (if2L32)hgesb/lared.9" class="line" nam4.2L329">"329
/4>        4truct 
a href="+code=lc_4lemen45nge.
/spa3.1"329
/4>
spa3 cl4"lib/lru_cache.c#L256" i4.2L2545lib/lru_cache.c#L346" id.2L3449" class="line" nam4.2L320lam416
/4>
spa3 cl4f (
a href="+code=list_e4pty" 45sref">"266
/a>        return 
a h3.1pu"=lc" class="sref">pu29" cl>
spa3 class="comment">"*       g346
/ href="lib/lru_cache.c#L266" id.2L266" class="line" nam4.2L266">lc_element
/a> *
a href="+code=e" class="sref">e
/a>)v"278
/4>
spa3 cl4       return 
a href="+4ode=N4LL" clss="line" nam4.2L244">"244
/4>vlist_del
/a>(
a href="+ELEMENT
/ref="lib/lru_cache.c#L280" id.2L280" class="line" nam4.2L280">"280
/4>        4a href="+code=n" class="4ref">4
/a> = 
a href="+code=lc" claELEMENT
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=e" class="sref">e
/a>);v"281
/4>        4a href="+code=e" class="4ref">4
/a> = 
a href="+code=list_en=e" class="sref">e
/a>->
a href="+code=refcnt" class="sref">refcnt
/a>);v"281
/4>static s4"lib/lru_cache.c#L262" i4.2L2646f">BUG_ON
/a>(
a href="+code=e" class="sref">e
/a>->
a href="+code=refcnt" class="sref">refcn;fref">PARANOIA_LC_d" class="sref">used
/a>, 
a href="+code=lc marked a>(struct 
a href="+cod marked a>(struc claass="line" nam4.2L280">"280
/4>{1list_--ef="+code=refcnt" class="sref">refcnt
/a>);v"244
/4>        4"lib/lru_cache.c#L264" i4.2L2646ass="sref">memset
/a>"lib/lru_cache.c#L209" id)/lrdit er.
/spfroot;of"LRU.a349" class="line" nam4.2L320lam416
/4>        4a href="+code=list_del" 4lass=46mment">/* something ompty
/a>(&
a hre"+code=e" class="sref">e
/a>->
a href="+code=list" class="sref">list
/a>, &
a href="+code=lc" class="sref">lc
/a>->
a href="+code=free" class="sref">free
/a>);v"280
/4>
spa3 cl4a href="+code=hlist_del"4class46code=e" class="sref">ef="+code=lc_nud" class="sref">used
/a>, 
a href="+code=lc" class="sref">lc
/a>->
--ss="line" nam4.2L280">"280
/4>
spa3 cl4eturn 
a href="+code=e" 4lass=46sref">e
/a>->
a href="+code=lc_nub/lar_bef="+code=e" clasb/lar_befref">f="lib/lru_cach__b/l).
/spa3ache.c#L284" id__b/l).
/spa3/a>->
a href="+code=free" class="sref">free
/a>);v"281
/4>}vlc
/a>->
a f">PARANOIA_LC_smp_mb__after_b/lar_bef="+code=e" classmp_mb__after_b/lar_bef0" class="line" nam4.2L280">"280
/4>v"249
/4>        4ss="comment">/**
/spa3.14a hre46/a> = 
a href="+code=lc" clab/lru_cache.c#L287" id.2L287" clef="+code=lc_nu.c#L281" id.2L281" clt
/a>);v"282
/4>
spa3 cl4ss="comment">"* lc_del -4remov47T" clss="line" nam4.2L249">"249
/4>
spa3 cl4ss="comment">"* @lc: The4lru_c47 class="line" nam4.2L312">"312
/4>{1"* @e: The 4lemen4 to remove
/spa3.1"313
/4>
spa3 cl4ss="comment">"*
/spa3.1<4 href47ment by label, maybe change the au_cache"by_index3" class="line" nam4.2L313">"313
/4>        4ss="comment">"* @e must 4e unu47he to opera e on
/spa3.1"315al4>
spa3 cl4ss="comment">"* sets @e-4gt;en47to look up
/spa3.1"315al4>
spa3 cl4ss="comment">"*/
/spa3.14a hre47href="lib/lru_cache.c#L327" i49" class="line" nam4.2L320lam416
/4>void 
a 4ref="+code=lc_del" class4"sref47 clasuot;
/spa3.1
spa3 class="comment">"*       g346
/ href="lib/lru_cache.c#L266" id.2L266" class="line" nam4.2L266">"266
/a>a href="lib/lru/ache.c#L176" id. class="line" nam4.2L278">"278
/4>{1"244
/4>        4a href="+code=PARANOIA_E4TRY" 47/a> = 
a href="+code=lc" cla=e" class="sref">e
/a>->
a href="+code=refcn/ache.c#L176" id. cla 
/a>
/a>;vused
/a>, 
a href="+code=lcnrr changeu_cache.c#L185" nrr changeu" class="line" nam4.2L282">"282
/4>        4a href="+code=PARANOIA_L4_ELEM48/a> = 
a href="+code=list_en=e" class="sref">e
/a>->
a href="+code=refcne" class="sref">free
/a>);vPARANOIA_LC_cache.c#L258" id.2L258" claass="line" nam4.2L280">"280
/4>        4a href="+code=BUG_ON" cl4ss="s48f">BUG_ON
/a>(
a href="+code=e" class="sref">e
/a>->
a href="+code=refcne" class="sref">free
/a>);v);vPARANOIA_LC_/ache.c#L176" id. classs="line" nam4.2L280">"280
/4>{1lc_evict
/a>(
a href="+co class="sref">free
/a>);v"280
/4>
spa3 cl4a href="+code=e" class="4ref">48 of tss="line" nam4.2L249">"249
/4>        4a href="+code=hlist_del_4nit" 48he tos="line" nam4.2L249">"249
/4>        4a href="+code=list_move"4class48spa3.1"313
/4>        4a href="+code=RETURN" cl4ss="s48href="lib/lru_cache.c#L327" id3.1index_of3" class="line" nam4.2L313">"313
/4>void 
a 4="lib/lru_cache.c#L288" 4d.2L248s marked %LC_STARVING,
/spf="lib/lru_cache.c#L315" id.2L315" class="line" nam4.2L315">"315al4>{1);v< changes) class="line" nam4.2L315">"315al4>        4ruct 
a href="+code=lc_e4ement48ng transact"on is still pendi49" class="line" nam4.2L320lam416
/4>{1"266
/a>        return 
a h3.1index_ofhe.c#L216" id.2L2rindex_of3" cl>
spa3 class="comment">"*       g346
/ href="lib/lru_cache.c#L266" id.2L266" class="line" nam4.2L266">lc_element
/a> *
a href="+code=e" class="sref">e
/a>)v"278
/4>        4truct 
a href="+code=lis4_head49VING,ss="line" nam4.2L244">"244
/4>vPARANOIA_LC_ELEMENT
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=e" class="sref">e
/a>);v"281
/4>        4f (
a href="+code=list_e4pty" 493ass="sref">lc_evict
/a>(
a href="+ class="sref">list
/a>, &
a href="+cod="indexhe.c#L216" id.2L2rindex3" css="line" nam4.2L281">"281
/4>        4       return 
a href="+4ode=l49nge.
ss="line" nam4.2L249">"249
/4>v"296
/4>        4a href="+code=n" class="4ref">49href="lib/lru_cache.c#L327"L313" class="line" nam4.2L313">"313
/4>        4a href="+code=list_del" 4lass=49s marked %LC_STARVING,
/spL2rst"ve ;LCocid.2Lindexthref=="lib3" class="line" nam4.2L313">"313
/4>{1"315al4>}v"329
/5>v"329
/5>static i5t 
a href="+code=lc_unus5d_ele5="lib/lru_cache.c#L202" id.2ii9" class="line" nam4.2L329">"329
/5>2tatic i5tlib/lru_cache.c#L293" i5d.2L35tats - print stats about @lc inUsru_er.iniDIaliz2Lc#L29" id.2L3216" Llib/previously"="lord23">ld.2.9" class="line" nam4.2L329">"329
/5>3tatic i5t (
a href="+code=list_e5mpty"5ile"to print into
/spa3.141(struct 
a href="+sb/lru_cache.c#L2167"sb/7" cl>
spa3 class="comment">"*       g346
/ href="lib/lru_cache.c#L266" id.2L266" class="line" nam4.2L266">"266
/a>        return 
a href="+code=e" class=n07">,>        return 
a hindexhe.c#L216" id.2index3" css="line" nam4.2L278">"278
/5>        5f (!
a href="+code=list_5mpty"5class=ss="line" nam4.2L244">"244
/5>        5       return 1;  
spa3 5lass=5comment">/* solist_head
/a> *
a href=f="+code=e" class="sref">e
/a>;1"255
/5>v"308
/5>        5eturn 0;v
/a>;vused
/a>, 
a href="+code=lcnrr changeu_cache.c#L185" nrr changeu" clas="line" nam4.2L308">"308
/5>9       5e"lib/lru_cache.c#L300" 5d.2L3509sref">lc
/a>->
a c_evicss="line" nam4.2L255">"255
/5>v =s="line" nam4.2L255">"255
/5>static i5"lib/lru_cache.c#L312" i5.2L3151f">BUG_ON
/a>(
a href="+codet" class="sref">refcn;fead
/a> *
a href=f="+code="by_indexhe.c#L216" id.2L2r change"by_index3" clf="+code=e" class="sref">e
/a>);v"255
/5>2tatic i5ss="comment">/**
/spa3.15a hre51T" class="sref">PARANOIA_LC_ class="sref">list
/a>, &
a href="+cod="+code=LC_FREE" class="sref">LC_FREE
/a>;vss="line" nam4.2L255">"255
/5>
spa3 cl5ss="comment">"* lc_get -5get e51 class="line" nam4.2L264">"264
/5>
spa3 cl5ss="comment">"* @lc: the5lru c51evict" class=f">PARANOIA_LC_hn
/a>del_iniD="+code=e" clashn
/a>del_iniD->
a href="+code=list" class="sref">list
/a>, &
a href="+coclib/lru_cache.c#L285" id.2L285" clsss="line" nam4.2L255">"255
/5>        5ss="comment">"* @enr: th5 labe51sref">e
/a>-&f">PARANOIA_LC_hn
/a>adnode=n" class="sref">hn
/a>adnode=n->
a href="+code=list" class="sref">list
/a>, &
a href="+coclib/lru_cache.c#L285" id.2L285" cl_hash_slot
/a>(
a href="+code=lc" class="sref">lc
/a>, 
a href="+code=enr" class="sref">enr
/a>), 
a href="+code=c href="+code=e" class=n07">"sss="line" nam4.2L255">"255
/5>        5ss="comment">"*
/spa3.1<5 href51/a> = 
a href="+code=lc" claa hre"+code=e" class="sref">e
/a>->
a href="+code=list" class="sref">list
/a>, &
a href="+code=lc" class="sref">lc
/a>-&gef="+code=lc_nu.c#L281" id.2L281" clt
/a>);vfree
/a>);vfree
/a>);v"280
/5>
spa3 cl5ss="comment">"* Finds an5eleme5="srefss="line" nam4.2L249">"249
/5>
spa3 cl5ss="comment">"* "to5ches&51 class="line" nam4.2L259">"259
/5>
spa3 cl5ss="comment">"*
/spa3.1<5 href51 case, the cache is marked L313" class="line" nam4.2L313">"313
/5>
spa3 cl5ss="comment">"* I3 case 5he re52 will be "recycled&quolibf">dumpve Dumpvaiz/spletsoLRUpche.c#L31seqche.cextual form.9" class="line" nam4.2L329">"329
/5>
spa3 cl5ss="comment">"* cache. T5erefo52"lib/lru_cache.c#L202" id.2iiel="lib/lru_cache.c#L315" id.2L315" class="line" nam4.2L315">"315al5>
spa3 cl5ss="comment">"* the cach5. I3 52ats - print stats about @lc in@seqlib/lrt;
a list_heseq_fileent element seq_pr elf3" id5" class="line" nam4.2L315">"315al5>
spa3 cl5ss="comment">"* a persis5ent l52ment by label, maybe change th@ucext:b so hsupplispa375" ide=ning375" irnt.oto e.infd5" class="line" nam4.2L315">"315al5>
spa3 cl5ss="comment">"*
/spa3.1<5 href52he to opera e on
/spa3.1"347
/5>
spa3 cl5ss="comment">"* Return v5lues:5/spa3.1Ldd/a>  .9" class="line" nam4.2L329">"329
/5>        5ss="comment">"*  NULL
/s5a3.1<5 href="lib/lru_cache.c#L327" i49" class="line" nam4.2L320lam416
/5>
spa3 cl5ss="comment">"*     The 5ache 5as marl
/a>(struct 
a href="+sbq>dump_detail4lru_cache.c#L2167"sbq>dump_detail47" cl>
spa3 class="comment"seq_filelru_cache.c#L21seq_file href="lib/lru_cache.seqlru_cache.c#L21seq2L266">lc_element
/a> *
a hre"*       g346
/ href="lib/lru_cache.c#L266" id.2L266" class="line" nam4.2L266"charc#L266" id.2L266"ucextlass="line" namucext2L266s="line" nam4.2L320lam416
/5>
spa3 cl5ss="comment">"*     or t5e req52"sref">lc
/a>->l
/a>(#L266" id.2L266"detaillass="line" namdetail" cla l>
spa3 class="comment"seq_filelru_cache.c#L21seq_file href=6">lc_element
/a> *
a href="+code=e" class="sref">e
/a>)v"308
/5>
spa3 cl5ss="comment">"*     and 5 chan5ing trss="line" nam4.2L244">"244
/5>
spa3 cl5ss="comment">"*     Or n5 unus53/a> = 
a href>"266
/a>        return 
a hnrr changeu_cache.c#L185" nrr changeu" clE
/a>;vused
/a>, 
a href="+code=lcnrr changeu_cache.c#L185" nrr changeu" clss="line" nam4.2L280">"280
/5>
spa3 cl5ss="comment">"*     ŷLC_ST53class="sref">list_head
/a> *
a href=f="+code=e" class="sref">e
/a>;1"255
/5>
spa3 cl5ss="comment">"*
/spa3.1<5 href53T" class="sre        return 
a hiache.c#L176" id. class="line" nam4.2L255">"255
/5>
spa3 cl5ss="comment">"*  pointer5to th53 class="line" nam4.2L264">"264
/5>
spa3 cl5ss="comment">"*     In t5is ca53evict" class=f">PARANOIA_LC_seq_pr elflru_cache.c#L21seq_pr elfa href="+code=enr" cseqlru_cache.c#L21seq2L266""lib/lru_cachlis=lc">375" i\tnn:.1"280
/5>
spa3 cl5ss="comment">"*
/spa3.1<5 href53sref">e
/a>-&foreref="+code=refcn/ache.c#L176" id. cla = 0 /a>;v;v"244
/5>
spa3 cl5ss="comment">"*  pointer5to an53sref">e
/a>->
a href="+code=lc_nut" class="sref">refcn;fead
/a> *
a href=f="+code="by_indexhe.c#L216" id.2L2r change"by_index3" clf="+code=e" class="sref">e
/a>);v"280
/5>
spa3 cl5ss="comment">"*         5where53"sref">lc
/a>->
a a href="+code=lc_number" class="sref">lc_number
/a> == 
a hrd="+code=LC_FREE" class="sref">LC_FREE
a href="+code=freb/lru_cache.c#L284" id.2L284" cla&ass="line" nam4.2L244">"244
/5>
spa3 cl5ss="comment">"*
/spa3.1<5 href53"sref">lc
/a>->
a " class=f">PARANOIA_LC_seq_pr elflru_cache.c#L21seq_pr elfa href="+code=enr" cseqlru_cache.c#L21seq2L266""lib/lru_cachlis=lc">375" i\tera "2d: 284"\n_cache9" clas&gef="+code=lc_nuiache.c#L176" id. claass="line" nam4.2L280">"280
/5>
spa3 cl5ss="comment">"*         5In th539sref">lc
/a>->
a } elseass="line" nam4.2L244">"244
/5>
spa3 cl5ss="comment">"*         5and t540ref">p
/a> -= 
a hre" class=f">PARANOIA_LC_seq_pr elflru_cache.c#L21seq_pr elfa href="+code=enr" cseqlru_cache.c#L21seq2L266""lib/lru_cachlis=lc">375" i\tera "2d: era "4u era "4u    _cache9" clas&gef="+code=lc_nuiache.c#L176" id. cla6s="line" nam4.2L320lam416
/5>
spa3 cl5ss="comment">"*         5hash 54lass="sref">p
/a> = 
> -= 
a hre" class=f">PARANOIA_LC_mber" class="sref">lc_number
/a> == 
a hrd="+code=LC_FREE" class="sref">LC_FRE&gef="+code=lc_nu.c#L281" id.2L281" clt
/a>);v"280
/5>
spa3 cl5ss="comment">"*         5is ne54sref">p
/a> -= 
a hre" class=f">PARANOIA_LC_detaillass="line" namdetail" clef="+code=enr" cseqlru_cache.c#L21seq2L266""f="+code=lc_nu.c#L281" id.2L281" class="line" nam4.2L280">"280
/5>
spa3 cl5ss="comment">"*         5Then 54/a>->
a hr->
a }s="line" nam4.2L280">"280
/5>
spa3 cl5ss="comment">"*         5the c54evict" class=}s="line" nam4.2L280">"280
/5>
spa3 cl5ss="comment">"*
/spa3.1<5 href54 clas}s="line" nam4.2L280">"280
/5>
spa3 cl5ss="comment">"* NOTE: Th5 user54 class="line" nam4.2L227">"227
/5>
spa3 cl5ss="comment">"*       an5 cach5 set"chf="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_creat  g346
/ href="lis_creat " class="line" nam4.2L280">"280
/5>
spa3 cl5ss="comment">"*/
/spa3.15a hre5="lib/lf="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_lru_=e" class="sref">e
lru_=" class="line" nam4.2L280">"280
/5>
spa3 cl5"\t%s: used:#u/6 case,f="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_delisoclass="sref">lc
ss_delisoc" class="line" nam4.2L280">"280
/5che.c#L205{1"280
/5c
spa3 cl5ruct 
a href="+code=lc_e5ement55"lib/lf="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_dellass="line" namss_del7" cass="line" nam4.2L280">"280
/5c
spa3 cl5="lib/lru_cache.c#L253" 5d.2L255ats - f="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_trylib/lru_cache.c#L2167"trylib/7" cass="line" nam4.2L280">"280
/5c
spa3 cl5truct 
a href="+code=lis5_head55 of thf="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_"+code=lru_cache" class="sref"ass="line" nam4.2L280">"280
/5c
spa3 cl5truct 
a href="+code=lc_5lemen55nge.
/f="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_ylib/lru_cache.c#L216ib/7" cass="line" nam4.2L280">"280
/5c80">"280
e=lc_4lemen45nge.
/spa3.5.2L2555lib/lrf="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_pu"=lc" class="sref">pu29" cass="line" nam4.2L280">"280
/5c
spa3 cl5f (
a href="+code=list_e5pty" 55sref"hf="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_ca hrefde=lru_cache" clas"280
/5c
spa3 cl5       return 
a href="+5ode=N55set"chf="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_"+code="by_indexhe.c#L216" id.2L2r change"by_index3" cass="line" nam4.2L280">"280
/5c
spa3 cl5"lib/lru_cache.c#L259" i5.2L2555"lib/lf="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_index_ofhe.c#L216" id.2L2rindex_of3" cass="line" nam4.2L280">"280
/5c
spa3 cl5a href="+code=n" class="5ref">55 case,f="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_seq_pr elf_>ld.4lru_cache.c#L2167"sbq>pr elf_>ld.43" cass="line" nam4.2L280">"280
/5>        5a href="+code=e" class="5ref">56 will f="+code=lc_nuEXPORT_SYMBOhe.c#L258" id.2LEXPORT_SYMBOh3" clf="+code=e" class_sbq>dump_detail4lru_cache.c#L2167"sbq>dump_detail47" cass="line" nam4.2L280">"280
/5>
spa3 cl5"lib/lru_cache.c#L262" i5.2L2656f">BU


T usoriginal LXR software1byspa3.="line" nhttp://sourceforge.net/projects/lx=L>LXR e.c#uni-> ,_ /gesexperiangeal verL2851bys="line" nmailto:lx=@cheux.no216x=@cheux.nogt; .
6x=.cheux.no kindly ho hrefbys="line" nhttp://www.redpill-chepro.no21Redpill Lhepro ASgt; ,_providcr;of"Lheux1consulid#L3rc w5" id.285s2L3rvices2Lihc2L1995.