[master] eb81298 Symbol visibility reduction.

Poul-Henning Kamp phk at varnish-cache.org
Tue May 24 09:00:57 CEST 2011


commit eb812987bb040eeea10672d81e0deb75e7387730
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue May 24 06:53:10 2011 +0000

    Symbol visibility reduction.

diff --git a/bin/varnishd/cache.h b/bin/varnishd/cache.h
index 6a85ce6..69cb666 100644
--- a/bin/varnishd/cache.h
+++ b/bin/varnishd/cache.h
@@ -177,7 +177,6 @@ struct http {
 	txt			*hd;
 	unsigned char		*hdf;
 #define HDF_FILTER		(1 << 0)	/* Filtered by Connection */
-#define HDF_COPY		(1 << 1)	/* Copy this field */
 	unsigned		nhd;		/* Next free hd */
 };
 
@@ -683,7 +682,6 @@ void EXP_Set_keep(struct exp *e, double v);
 
 double EXP_Ttl(const struct sess *, const struct object*);
 double EXP_Grace(const struct sess *, const struct object*);
-double EXP_Keep(const struct sess *, const struct object*);
 void EXP_Insert(struct object *o);
 void EXP_Inject(struct objcore *oc, struct lru *lru, double when);
 void EXP_Init(void);
@@ -802,7 +800,6 @@ void Lck_CondWait(pthread_cond_t *cond, struct lock *lck);
 #define Lck_Unlock(a) Lck__Unlock(a, __func__, __FILE__, __LINE__)
 #define Lck_Trylock(a) Lck__Trylock(a, __func__, __FILE__, __LINE__)
 #define Lck_AssertHeld(a) Lck__Assert(a, 1)
-#define Lck_AssertNotHeld(a) Lck__Assert(a, 0)
 
 #define LOCK(nam) extern struct vsc_lck *lck_##nam;
 #include "locks.h"
@@ -816,7 +813,6 @@ void PipeSession(struct sess *sp);
 
 /* cache_pool.c */
 void WRK_Init(void);
-int WRK_Queue(struct workreq *wrq);
 int WRK_QueueSession(struct sess *sp);
 void WRK_SumStat(struct worker *w);
 
@@ -891,7 +887,6 @@ int VRY_Match(const struct sess *sp, const unsigned char *vary);
 void VCL_Init(void);
 void VCL_Refresh(struct VCL_conf **vcc);
 void VCL_Rel(struct VCL_conf **vcc);
-void VCL_Get(struct VCL_conf **vcc);
 void VCL_Poll(void);
 
 #define VCL_MET_MAC(l,u,b) void VCL_##l##_method(struct sess *);
diff --git a/bin/varnishd/cache_expire.c b/bin/varnishd/cache_expire.c
index f758053..a8b391f 100644
--- a/bin/varnishd/cache_expire.c
+++ b/bin/varnishd/cache_expire.c
@@ -97,7 +97,7 @@ EXP_ACCESS(keep, 0.,)
  * by per-session limits.
  */
 
-double
+static double
 EXP_Keep(const struct sess *sp, const struct object *o)
 {
 	double r;
diff --git a/bin/varnishd/cache_pool.c b/bin/varnishd/cache_pool.c
index 2b82455..816bdbe 100644
--- a/bin/varnishd/cache_pool.c
+++ b/bin/varnishd/cache_pool.c
@@ -239,7 +239,7 @@ wrk_thread(void *priv)
  * Return zero if the request was queued, negative if it wasn't.
  */
 
-int
+static int
 WRK_Queue(struct workreq *wrq)
 {
 	struct worker *w;
diff --git a/bin/varnishd/cache_vcl.c b/bin/varnishd/cache_vcl.c
index d2f74fc..e851f06 100644
--- a/bin/varnishd/cache_vcl.c
+++ b/bin/varnishd/cache_vcl.c
@@ -67,17 +67,7 @@ static struct vcls		*vcl_active; /* protected by vcl_mtx */
 
 /*--------------------------------------------------------------------*/
 
-void
-VCL_Refresh(struct VCL_conf **vcc)
-{
-	if (*vcc == vcl_active->conf)
-		return;
-	if (*vcc != NULL)
-		VCL_Rel(vcc);	/* XXX: optimize locking */
-	VCL_Get(vcc);
-}
-
-void
+static void
 VCL_Get(struct VCL_conf **vcc)
 {
 	static int once = 0;
@@ -97,6 +87,16 @@ VCL_Get(struct VCL_conf **vcc)
 }
 
 void
+VCL_Refresh(struct VCL_conf **vcc)
+{
+	if (*vcc == vcl_active->conf)
+		return;
+	if (*vcc != NULL)
+		VCL_Rel(vcc);	/* XXX: optimize locking */
+	VCL_Get(vcc);
+}
+
+void
 VCL_Rel(struct VCL_conf **vcc)
 {
 	struct VCL_conf *vc;



More information about the varnish-commit mailing list