Commit 083e7edf authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Now that we only have one timer firing, remove stuff to deal with

different events.



git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@3782 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent 06890681
......@@ -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)
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment