[PATCH 1/2] Expose exp->entered via macros

Tollef Fog Heen tfheen at varnish-software.com
Mon Oct 15 13:49:44 CEST 2012


---
 bin/varnishd/cache/cache.h        |    2 ++
 bin/varnishd/cache/cache_expire.c |    1 +
 2 files changed, 3 insertions(+)

diff --git a/bin/varnishd/cache/cache.h b/bin/varnishd/cache/cache.h
index 6d4fe86..1c6a833 100644
--- a/bin/varnishd/cache/cache.h
+++ b/bin/varnishd/cache/cache.h
@@ -782,9 +782,11 @@ void EXP_Clr(struct exp *e);
 double EXP_Get_ttl(const struct exp *e);
 double EXP_Get_grace(const struct exp *e);
 double EXP_Get_keep(const struct exp *e);
+double EXP_Get_entered(const struct exp *e);
 void EXP_Set_ttl(struct exp *e, double v);
 void EXP_Set_grace(struct exp *e, double v);
 void EXP_Set_keep(struct exp *e, double v);
+void EXP_Set_entered(struct exp *e, double v);
 
 double EXP_Ttl(const struct req *, const struct object*);
 double EXP_Grace(const struct req *, const struct object*);
diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index 80c630f..bc3cb0b 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -102,6 +102,7 @@ EXP_Clr(struct exp *e)
 EXP_ACCESS(ttl, -1., (e->grace = e->keep = -1.))
 EXP_ACCESS(grace, 0., )
 EXP_ACCESS(keep, 0.,)
+EXP_ACCESS(entered, 0.,)
 
 /*--------------------------------------------------------------------
  * Calculate an objects effective keep, grace or ttl time, suitably
-- 
1.7.10.4




More information about the varnish-dev mailing list