r3802 - trunk/varnish-cache/bin/varnishd

phk at projects.linpro.no phk at projects.linpro.no
Fri Feb 20 20:06:07 CET 2009


Author: phk
Date: 2009-02-20 20:06:07 +0100 (Fri, 20 Feb 2009)
New Revision: 3802

Modified:
   trunk/varnish-cache/bin/varnishd/cache.h
   trunk/varnish-cache/bin/varnishd/cache_hash.c
   trunk/varnish-cache/bin/varnishd/cache_pool.c
   trunk/varnish-cache/bin/varnishd/hash_slinger.h
Log:
Some constifications



Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h	2009-02-20 18:41:57 UTC (rev 3801)
+++ trunk/varnish-cache/bin/varnishd/cache.h	2009-02-20 19:06:07 UTC (rev 3802)
@@ -564,7 +564,7 @@
 void WRK_Init(void);
 int WRK_Queue(struct workreq *wrq);
 void WRK_QueueSession(struct sess *sp);
-void WRK_SumStat(struct worker *w);
+void WRK_SumStat(const struct worker *w);
 
 void WRW_Reserve(struct worker *w, int *fd);
 void WRW_Release(struct worker *w);

Modified: trunk/varnish-cache/bin/varnishd/cache_hash.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_hash.c	2009-02-20 18:41:57 UTC (rev 3801)
+++ trunk/varnish-cache/bin/varnishd/cache_hash.c	2009-02-20 19:06:07 UTC (rev 3802)
@@ -162,7 +162,7 @@
 }
 
 void
-HSH_DeleteObjHead(struct worker *w, struct objhead *oh)
+HSH_DeleteObjHead(const struct worker *w, struct objhead *oh)
 {
 
 	AZ(oh->refcnt);
@@ -478,7 +478,7 @@
 }
 
 void
-HSH_Deref(struct worker *w, struct object **oo)
+HSH_Deref(const struct worker *w, struct object **oo)
 {
 	struct object *o;
 	struct objhead *oh;

Modified: trunk/varnish-cache/bin/varnishd/cache_pool.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_pool.c	2009-02-20 18:41:57 UTC (rev 3801)
+++ trunk/varnish-cache/bin/varnishd/cache_pool.c	2009-02-20 19:06:07 UTC (rev 3802)
@@ -266,12 +266,12 @@
 /*--------------------------------------------------------------------*/
 
 static void
-wrk_sumstat(struct worker *w)
+wrk_sumstat(const struct worker *w)
 {
 
 	Lck_AssertHeld(&wstat_mtx);
 #define L0(n)
-#define L1(n) VSL_stats->n += w->stats->n 
+#define L1(n) (VSL_stats->n += w->stats->n)
 #define MAC_STAT(n, t, l, f, d) L##l(n);
 #include "stat_field.h"
 #undef MAC_STAT
@@ -281,7 +281,7 @@
 }
 
 void
-WRK_SumStat(struct worker *w)
+WRK_SumStat(const struct worker *w)
 {
 	Lck_Lock(&wstat_mtx);
 	wrk_sumstat(w);

Modified: trunk/varnish-cache/bin/varnishd/hash_slinger.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/hash_slinger.h	2009-02-20 18:41:57 UTC (rev 3801)
+++ trunk/varnish-cache/bin/varnishd/hash_slinger.h	2009-02-20 19:06:07 UTC (rev 3802)
@@ -100,6 +100,6 @@
 };
 
 extern unsigned	save_hash;
-void HSH_DeleteObjHead(struct worker *w, struct objhead *oh);
-void HSH_Deref(struct worker *w, struct object **o);
+void HSH_DeleteObjHead(const struct worker *w, struct objhead *oh);
+void HSH_Deref(const struct worker *w, struct object **o);
 #endif /* VARNISH_CACHE_CHILD */



More information about the varnish-commit mailing list