]> err.no Git - varnish/commitdiff
Now that we only have one timer firing, remove stuff to deal with
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 17 Feb 2009 10:50:42 +0000 (10:50 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Tue, 17 Feb 2009 10:50:42 +0000 (10:50 +0000)
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
varnish-cache/bin/varnishd/cache_expire.c

index ba020bfe031b6fa731b6c5e58219275ff78e70e7..f71f6d6f9b23464eb55fb935fd8ccbf5c555f93b 100644 (file)
@@ -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)
index 9d3d7a4e5341ba53353b1b1b1f64b47f239350d7..e9a9f3674f390305ca5c96a568e8316939e8e795 100644 (file)
@@ -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;