Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
varnish-cache
Commits
e7a12895
Commit
e7a12895
authored
Sep 15, 2014
by
Poul-Henning Kamp
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor cleanup.
parent
5da2d319
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
22 deletions
+21
-22
cache.h
bin/varnishd/cache/cache.h
+12
-13
cache_obj.c
bin/varnishd/cache/cache_obj.c
+2
-2
stevedore.c
bin/varnishd/storage/stevedore.c
+2
-2
storage.h
bin/varnishd/storage/storage.h
+2
-2
storage_persistent_silo.c
bin/varnishd/storage/storage_persistent_silo.c
+3
-3
No files found.
bin/varnishd/cache/cache.h
View file @
e7a12895
...
@@ -403,6 +403,18 @@ struct storeobj {
...
@@ -403,6 +403,18 @@ struct storeobj {
* housekeeping fields parts of an object.
* housekeeping fields parts of an object.
*/
*/
enum
obj_attr
{
#define OBJ_ATTR(U, l) OA_##U,
#include "tbl/obj_attr.h"
#undef OBJ_ATTR
};
enum
obj_flags
{
#define OBJ_FLAG(U, l, v) OF_##U = v,
#include "tbl/obj_attr.h"
#undef OBJ_FLAG
};
struct
objcore
{
struct
objcore
{
unsigned
magic
;
unsigned
magic
;
#define OBJCORE_MAGIC 0x4d301302
#define OBJCORE_MAGIC 0x4d301302
...
@@ -517,19 +529,6 @@ struct busyobj {
...
@@ -517,19 +529,6 @@ struct busyobj {
struct
vsb
*
synth_body
;
struct
vsb
*
synth_body
;
};
};
/* Object structure --------------------------------------------------*/
enum
obj_attr
{
#define OBJ_ATTR(U, l) OA_##U,
#include "tbl/obj_attr.h"
#undef OBJ_ATTR
};
enum
obj_flags
{
#define OBJ_FLAG(U, l, v) OF_##U = v,
#include "tbl/obj_attr.h"
#undef OBJ_FLAG
};
/*--------------------------------------------------------------------*/
/*--------------------------------------------------------------------*/
...
...
bin/varnishd/cache/cache_obj.c
View file @
e7a12895
...
@@ -64,7 +64,7 @@ obj_getobj(struct objcore *oc, struct dstat *ds)
...
@@ -64,7 +64,7 @@ obj_getobj(struct objcore *oc, struct dstat *ds)
AN
(
ds
);
AN
(
ds
);
AN
(
m
->
getobj
);
AN
(
m
->
getobj
);
return
(
m
->
getobj
(
ds
,
oc
));
return
(
m
->
getobj
(
oc
,
ds
));
}
}
/*--------------------------------------------------------------------
/*--------------------------------------------------------------------
...
@@ -346,7 +346,7 @@ ObjFreeObj(struct objcore *oc, struct dstat *ds)
...
@@ -346,7 +346,7 @@ ObjFreeObj(struct objcore *oc, struct dstat *ds)
AN
(
ds
);
AN
(
ds
);
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
AN
(
m
->
freeobj
);
AN
(
m
->
freeobj
);
m
->
freeobj
(
ds
,
oc
);
m
->
freeobj
(
oc
,
ds
);
}
}
struct
lru
*
struct
lru
*
...
...
bin/varnishd/storage/stevedore.c
View file @
e7a12895
...
@@ -49,7 +49,7 @@ static const struct stevedore * volatile stv_next;
...
@@ -49,7 +49,7 @@ static const struct stevedore * volatile stv_next;
*/
*/
static
struct
object
*
__match_proto__
(
getobj_f
)
static
struct
object
*
__match_proto__
(
getobj_f
)
default_oc_getobj
(
struct
dstat
*
ds
,
struct
objcore
*
oc
)
default_oc_getobj
(
struct
objcore
*
oc
,
struct
dstat
*
ds
)
{
{
struct
object
*
o
;
struct
object
*
o
;
...
@@ -61,7 +61,7 @@ default_oc_getobj(struct dstat *ds, struct objcore *oc)
...
@@ -61,7 +61,7 @@ default_oc_getobj(struct dstat *ds, struct objcore *oc)
}
}
static
void
__match_proto__
(
freeobj_f
)
static
void
__match_proto__
(
freeobj_f
)
default_oc_freeobj
(
struct
dstat
*
ds
,
struct
objcore
*
oc
)
default_oc_freeobj
(
struct
objcore
*
oc
,
struct
dstat
*
ds
)
{
{
struct
object
*
o
;
struct
object
*
o
;
...
...
bin/varnishd/storage/storage.h
View file @
e7a12895
...
@@ -80,9 +80,9 @@ struct object {
...
@@ -80,9 +80,9 @@ struct object {
/* -------------------------------------------------------------------*/
/* -------------------------------------------------------------------*/
typedef
struct
object
*
getobj_f
(
struct
dstat
*
ds
,
struct
objcore
*
oc
);
typedef
struct
object
*
getobj_f
(
struct
objcore
*
oc
,
struct
dstat
*
);
typedef
void
updatemeta_f
(
struct
objcore
*
oc
,
struct
dstat
*
);
typedef
void
updatemeta_f
(
struct
objcore
*
oc
,
struct
dstat
*
);
typedef
void
freeobj_f
(
struct
dstat
*
ds
,
struct
objcore
*
oc
);
typedef
void
freeobj_f
(
struct
objcore
*
oc
,
struct
dstat
*
);
typedef
struct
lru
*
getlru_f
(
const
struct
objcore
*
oc
);
typedef
struct
lru
*
getlru_f
(
const
struct
objcore
*
oc
);
struct
storeobj_methods
{
struct
storeobj_methods
{
...
...
bin/varnishd/storage/storage_persistent_silo.c
View file @
e7a12895
...
@@ -388,7 +388,7 @@ smp_loaded_st(const struct smp_sc *sc, const struct smp_seg *sg,
...
@@ -388,7 +388,7 @@ smp_loaded_st(const struct smp_sc *sc, const struct smp_seg *sg,
*/
*/
static
struct
object
*
static
struct
object
*
smp_oc_getobj
(
struct
dstat
*
ds
,
struct
objcore
*
oc
)
smp_oc_getobj
(
struct
objcore
*
oc
,
struct
dstat
*
ds
)
{
{
struct
object
*
o
;
struct
object
*
o
;
struct
smp_seg
*
sg
;
struct
smp_seg
*
sg
;
...
@@ -464,7 +464,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
...
@@ -464,7 +464,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
struct
smp_object
*
so
;
struct
smp_object
*
so
;
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
CHECK_OBJ_NOTNULL
(
oc
,
OBJCORE_MAGIC
);
o
=
smp_oc_getobj
(
ds
,
oc
);
o
=
smp_oc_getobj
(
oc
,
ds
);
AN
(
o
);
AN
(
o
);
CAST_OBJ_NOTNULL
(
sg
,
oc
->
stobj
->
priv
,
SMP_SEG_MAGIC
);
CAST_OBJ_NOTNULL
(
sg
,
oc
->
stobj
->
priv
,
SMP_SEG_MAGIC
);
...
@@ -484,7 +484,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
...
@@ -484,7 +484,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
}
}
static
void
__match_proto__
(
freeobj_f
)
static
void
__match_proto__
(
freeobj_f
)
smp_oc_freeobj
(
struct
dstat
*
ds
,
struct
objcore
*
oc
)
smp_oc_freeobj
(
struct
objcore
*
oc
,
struct
dstat
*
ds
)
{
{
struct
smp_seg
*
sg
;
struct
smp_seg
*
sg
;
struct
smp_object
*
so
;
struct
smp_object
*
so
;
...
...
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