From 6ce5b0042a9773f406d03908389df68064654d49 Mon Sep 17 00:00:00 2001 From: phk Date: Tue, 17 Feb 2009 10:50:42 +0000 Subject: [PATCH] Now that we only have one timer firing, remove stuff to deal with different events. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3782 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache.h | 2 -- varnish-cache/bin/varnishd/cache_expire.c | 11 +---------- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index ba020bfe..f71f6d6f 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -263,8 +263,6 @@ struct objcore { struct object *obj; double timer_when; double ttl; - unsigned char timer_what; -#define OC_T_TTL 1 unsigned char flags; #define OC_F_ONLRU (1<<0) #define OC_F_BUSY (1<<1) diff --git a/varnish-cache/bin/varnishd/cache_expire.c b/varnish-cache/bin/varnishd/cache_expire.c index 9d3d7a4e..e9a9f367 100644 --- a/varnish-cache/bin/varnishd/cache_expire.c +++ b/varnish-cache/bin/varnishd/cache_expire.c @@ -68,10 +68,6 @@ static struct binheap *exp_heap; static struct lock exp_mtx; static VTAILQ_HEAD(,objcore) lru = VTAILQ_HEAD_INITIALIZER(lru); -static const char *timer_what[] = { - [OC_T_TTL] = "TTL", -}; - /* * This is a magic marker for the objects currently on the SIOP [look it up] * so that other users of the object will not stumble trying to change the @@ -88,7 +84,6 @@ update_object_when(const struct object *o) { struct objcore *oc; double when; - unsigned char what; CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC); oc = o->objcore; @@ -96,9 +91,7 @@ update_object_when(const struct object *o) Lck_AssertHeld(&exp_mtx); when = oc->ttl + HSH_Grace(o->grace); - what = OC_T_TTL; assert(!isnan(when)); - oc->timer_what = what; if (when == oc->timer_when) return (0); oc->timer_when = when; @@ -268,10 +261,8 @@ exp_timer(void *arg) assert(oc->flags & OC_F_ONLRU); Lck_Unlock(&exp_mtx); - WSL(&ww, SLT_ExpPick, 0, "%u %s", o->xid, - timer_what[oc->timer_what]); + WSL(&ww, SLT_ExpPick, 0, "%u TTL", o->xid); - assert(oc->timer_what == OC_T_TTL); sp->obj = o; VCL_timeout_method(sp); sp->obj = NULL; -- 2.39.5