Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
U
unique-xids
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
uplex-varnish
unique-xids
Commits
57fed777
Commit
57fed777
authored
Feb 09, 2011
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a LRU_Free() function
parent
abf653cd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
stevedore.c
bin/varnishd/stevedore.c
+8
-6
stevedore.h
bin/varnishd/stevedore.h
+1
-0
No files found.
bin/varnishd/stevedore.c
View file @
57fed777
...
@@ -55,12 +55,6 @@ static const struct stevedore * volatile stv_next;
...
@@ -55,12 +55,6 @@ static const struct stevedore * volatile stv_next;
static
struct
stevedore
*
stv_transient
;
static
struct
stevedore
*
stv_transient
;
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
* NB! Dirty trick alert:
*
* We use a captive objcore as tail senteniel for LRU lists, but to
* make sure it does not get into play by accident, we do _not_
* initialize its magic with OBJCORE_MAGIC.
*
*/
*/
struct
lru
*
struct
lru
*
...
@@ -75,6 +69,14 @@ LRU_Alloc(void)
...
@@ -75,6 +69,14 @@ LRU_Alloc(void)
return
(
l
);
return
(
l
);
}
}
void
LRU_Free
(
struct
lru
*
lru
)
{
CHECK_OBJ_NOTNULL
(
lru
,
LRU_MAGIC
);
Lck_Delete
(
&
lru
->
mtx
);
FREE_OBJ
(
lru
);
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
* XXX: trust pointer writes to be atomic
* XXX: trust pointer writes to be atomic
*/
*/
...
...
bin/varnishd/stevedore.h
View file @
57fed777
...
@@ -102,6 +102,7 @@ void STV_Config_Transient(void);
...
@@ -102,6 +102,7 @@ void STV_Config_Transient(void);
void
STV_Freestore
(
struct
object
*
o
);
void
STV_Freestore
(
struct
object
*
o
);
struct
lru
*
LRU_Alloc
(
void
);
struct
lru
*
LRU_Alloc
(
void
);
void
LRU_Free
(
struct
lru
*
lru
);
int
STV_GetFile
(
const
char
*
fn
,
int
*
fdp
,
const
char
**
fnp
,
const
char
*
ctx
);
int
STV_GetFile
(
const
char
*
fn
,
int
*
fdp
,
const
char
**
fnp
,
const
char
*
ctx
);
uintmax_t
STV_FileSize
(
int
fd
,
const
char
*
size
,
unsigned
*
granularity
,
uintmax_t
STV_FileSize
(
int
fd
,
const
char
*
size
,
unsigned
*
granularity
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment