[master] e7a1289 Minor cleanup.

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 15 21:31:32 CEST 2014


commit e7a12895014b6e3b6514c803c3da60d63bb5cf42
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 15 19:31:19 2014 +0000

    Minor cleanup.

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 3add9ef..f463397 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -403,6 +403,18 @@ struct storeobj {
  * 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 {
 	unsigned		magic;
 #define OBJCORE_MAGIC		0x4d301302
@@ -517,19 +529,6 @@ struct busyobj {
 	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
-};
 
 /*--------------------------------------------------------------------*/
 
diff --git a/bin/varnishd/cache/cache_obj.c b/bin/varnishd/cache/cache_obj.c
index 81e65cf..6013818 100644
--- a/bin/varnishd/cache/cache_obj.c
+++ b/bin/varnishd/cache/cache_obj.c
@@ -64,7 +64,7 @@ obj_getobj(struct objcore *oc, struct dstat *ds)
 
 	AN(ds);
 	AN(m->getobj);
-	return (m->getobj(ds, oc));
+	return (m->getobj(oc, ds));
 }
 
 /*--------------------------------------------------------------------
@@ -346,7 +346,7 @@ ObjFreeObj(struct objcore *oc, struct dstat *ds)
 	AN(ds);
 	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
 	AN(m->freeobj);
-	m->freeobj(ds, oc);
+	m->freeobj(oc, ds);
 }
 
 struct lru *
diff --git a/bin/varnishd/storage/stevedore.c b/bin/varnishd/storage/stevedore.c
index 11c8828..03f599a 100644
--- a/bin/varnishd/storage/stevedore.c
+++ b/bin/varnishd/storage/stevedore.c
@@ -49,7 +49,7 @@ static const struct stevedore * volatile stv_next;
  */
 
 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;
 
@@ -61,7 +61,7 @@ default_oc_getobj(struct dstat *ds, struct objcore *oc)
 }
 
 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;
 
diff --git a/bin/varnishd/storage/storage.h b/bin/varnishd/storage/storage.h
index e9a12be..1e42e23 100644
--- a/bin/varnishd/storage/storage.h
+++ b/bin/varnishd/storage/storage.h
@@ -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 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);
 
 struct storeobj_methods {
diff --git a/bin/varnishd/storage/storage_persistent_silo.c b/bin/varnishd/storage/storage_persistent_silo.c
index 190843f..b0dbff9 100644
--- a/bin/varnishd/storage/storage_persistent_silo.c
+++ b/bin/varnishd/storage/storage_persistent_silo.c
@@ -388,7 +388,7 @@ smp_loaded_st(const struct smp_sc *sc, const struct smp_seg *sg,
  */
 
 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 smp_seg *sg;
@@ -464,7 +464,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
 	struct smp_object *so;
 
 	CHECK_OBJ_NOTNULL(oc, OBJCORE_MAGIC);
-	o = smp_oc_getobj(ds, oc);
+	o = smp_oc_getobj(oc, ds);
 	AN(o);
 
 	CAST_OBJ_NOTNULL(sg, oc->stobj->priv, SMP_SEG_MAGIC);
@@ -484,7 +484,7 @@ smp_oc_updatemeta(struct objcore *oc, struct dstat *ds)
 }
 
 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_object *so;



More information about the varnish-commit mailing list