r3782 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Tue Feb 17 11:50:42 CET 2009
Author: phk
Date: 2009-02-17 11:50:42 +0100 (Tue, 17 Feb 2009)
New Revision: 3782
Modified:
trunk/varnish-cache/bin/varnishd/cache.h
trunk/varnish-cache/bin/varnishd/cache_expire.c
Log:
Now that we only have one timer firing, remove stuff to deal with
different events.
Modified: trunk/varnish-cache/bin/varnishd/cache.h
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache.h 2009-02-17 10:29:20 UTC (rev 3781)
+++ trunk/varnish-cache/bin/varnishd/cache.h 2009-02-17 10:50:42 UTC (rev 3782)
@@ -263,8 +263,6 @@
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)
Modified: trunk/varnish-cache/bin/varnishd/cache_expire.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_expire.c 2009-02-17 10:29:20 UTC (rev 3781)
+++ trunk/varnish-cache/bin/varnishd/cache_expire.c 2009-02-17 10:50:42 UTC (rev 3782)
@@ -68,10 +68,6 @@
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 @@
{
struct objcore *oc;
double when;
- unsigned char what;
CHECK_OBJ_NOTNULL(o, OBJECT_MAGIC);
oc = o->objcore;
@@ -96,9 +91,7 @@
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 @@
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;
More information about the varnish-commit
mailing list